ZCRMSDK 1.0.2 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/ZCRMSDK.rb +362 -0
- data/src/com/zoho/api/authenticator/oauth_token.rb +217 -0
- data/src/com/zoho/api/authenticator/store/db_store.rb +149 -0
- data/src/com/zoho/api/authenticator/store/file_store.rb +165 -0
- data/src/com/zoho/api/authenticator/store/token_store.rb +26 -0
- data/src/com/zoho/api/authenticator/token.rb +10 -0
- data/src/com/zoho/api/logger/sdk_logger.rb +68 -0
- data/src/com/zoho/crm/api/attachments/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/attachments/action_response.rb +10 -0
- data/src/com/zoho/crm/api/attachments/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/attachments/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/attachments/attachment.rb +367 -0
- data/src/com/zoho/crm/api/attachments/attachments_operations.rb +196 -0
- data/src/com/zoho/crm/api/attachments/file_body_wrapper.rb +64 -0
- data/src/com/zoho/crm/api/attachments/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/attachments/response_wrapper.rb +83 -0
- data/src/com/zoho/crm/api/attachments/success_response.rb +121 -0
- data/src/com/zoho/crm/api/blue_print/action_response.rb +10 -0
- data/src/com/zoho/crm/api/blue_print/api_exception.rb +123 -0
- data/src/com/zoho/crm/api/blue_print/blue_print.rb +119 -0
- data/src/com/zoho/crm/api/blue_print/blue_print_operations.rb +67 -0
- data/src/com/zoho/crm/api/blue_print/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/blue_print/next_transition.rb +80 -0
- data/src/com/zoho/crm/api/blue_print/process_info.rb +251 -0
- data/src/com/zoho/crm/api/blue_print/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/blue_print/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/blue_print/success_response.rb +121 -0
- data/src/com/zoho/crm/api/blue_print/transition.rb +253 -0
- data/src/com/zoho/crm/api/blue_print/validation_error.rb +80 -0
- data/src/com/zoho/crm/api/bulk_read/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/bulk_read/action_response.rb +10 -0
- data/src/com/zoho/crm/api/bulk_read/action_wrapper.rb +82 -0
- data/src/com/zoho/crm/api/bulk_read/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/bulk_read/bulk_read_operations.rb +74 -0
- data/src/com/zoho/crm/api/bulk_read/call_back.rb +81 -0
- data/src/com/zoho/crm/api/bulk_read/criteria.rb +135 -0
- data/src/com/zoho/crm/api/bulk_read/file_body_wrapper.rb +64 -0
- data/src/com/zoho/crm/api/bulk_read/job_detail.rb +196 -0
- data/src/com/zoho/crm/api/bulk_read/query.rb +137 -0
- data/src/com/zoho/crm/api/bulk_read/request_wrapper.rb +100 -0
- data/src/com/zoho/crm/api/bulk_read/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/bulk_read/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/bulk_read/result.rb +137 -0
- data/src/com/zoho/crm/api/bulk_read/success_response.rb +121 -0
- data/src/com/zoho/crm/api/bulk_write/action_response.rb +10 -0
- data/src/com/zoho/crm/api/bulk_write/api_exception.rb +239 -0
- data/src/com/zoho/crm/api/bulk_write/bulk_write_operations.rb +112 -0
- data/src/com/zoho/crm/api/bulk_write/bulk_write_response.rb +216 -0
- data/src/com/zoho/crm/api/bulk_write/call_back.rb +81 -0
- data/src/com/zoho/crm/api/bulk_write/field_mapping.rb +156 -0
- data/src/com/zoho/crm/api/bulk_write/file.rb +157 -0
- data/src/com/zoho/crm/api/bulk_write/file_body_wrapper.rb +64 -0
- data/src/com/zoho/crm/api/bulk_write/request_wrapper.rb +119 -0
- data/src/com/zoho/crm/api/bulk_write/resource.rb +195 -0
- data/src/com/zoho/crm/api/bulk_write/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/bulk_write/response_wrapper.rb +10 -0
- data/src/com/zoho/crm/api/bulk_write/result.rb +61 -0
- data/src/com/zoho/crm/api/bulk_write/success_response.rb +121 -0
- data/src/com/zoho/crm/api/contact_roles/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/contact_roles/action_response.rb +10 -0
- data/src/com/zoho/crm/api/contact_roles/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/contact_roles/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/contact_roles/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/contact_roles/contact_role.rb +99 -0
- data/src/com/zoho/crm/api/contact_roles/contact_roles_operations.rb +161 -0
- data/src/com/zoho/crm/api/contact_roles/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/contact_roles/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/contact_roles/success_response.rb +121 -0
- data/src/com/zoho/crm/api/currencies/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/currencies/action_response.rb +10 -0
- data/src/com/zoho/crm/api/currencies/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/currencies/api_exception.rb +127 -0
- data/src/com/zoho/crm/api/currencies/base_currency_action_handler.rb +10 -0
- data/src/com/zoho/crm/api/currencies/base_currency_action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/currencies/base_currency_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/currencies/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/currencies/currencies_operations.rb +156 -0
- data/src/com/zoho/crm/api/currencies/currency.rb +290 -0
- data/src/com/zoho/crm/api/currencies/format.rb +100 -0
- data/src/com/zoho/crm/api/currencies/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/currencies/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/currencies/success_response.rb +121 -0
- data/src/com/zoho/crm/api/custom_views/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/custom_views/criteria.rb +135 -0
- data/src/com/zoho/crm/api/custom_views/custom_view.rb +327 -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 +156 -0
- data/src/com/zoho/crm/api/custom_views/range.rb +80 -0
- data/src/com/zoho/crm/api/custom_views/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/custom_views/response_wrapper.rb +82 -0
- data/src/com/zoho/crm/api/custom_views/shared_details.rb +118 -0
- data/src/com/zoho/crm/api/custom_views/translation.rb +118 -0
- data/src/com/zoho/crm/api/dc/au_datacenter.rb +18 -0
- data/src/com/zoho/crm/api/dc/cn_datacenter.rb +18 -0
- data/src/com/zoho/crm/api/dc/datacenter.rb +20 -0
- data/src/com/zoho/crm/api/dc/eu_datacenter.rb +18 -0
- data/src/com/zoho/crm/api/dc/in_datacenter.rb +18 -0
- data/src/com/zoho/crm/api/dc/us_datacenter.rb +18 -0
- data/src/com/zoho/crm/api/exception/sdk_exception.rb +47 -0
- data/src/com/zoho/crm/api/fields/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/fields/association_details.rb +80 -0
- data/src/com/zoho/crm/api/fields/auto_number.rb +99 -0
- data/src/com/zoho/crm/api/fields/crypt.rb +156 -0
- data/src/com/zoho/crm/api/fields/currency.rb +80 -0
- data/src/com/zoho/crm/api/fields/field.rb +956 -0
- data/src/com/zoho/crm/api/fields/fields_operations.rb +71 -0
- data/src/com/zoho/crm/api/fields/formula.rb +80 -0
- data/src/com/zoho/crm/api/fields/lookup_field.rb +80 -0
- data/src/com/zoho/crm/api/fields/module.rb +157 -0
- data/src/com/zoho/crm/api/fields/multi_select_lookup.rb +156 -0
- data/src/com/zoho/crm/api/fields/pick_list_value.rb +175 -0
- data/src/com/zoho/crm/api/fields/private.rb +99 -0
- data/src/com/zoho/crm/api/fields/related_details.rb +137 -0
- data/src/com/zoho/crm/api/fields/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/fields/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/fields/tool_tip.rb +80 -0
- data/src/com/zoho/crm/api/fields/unique.rb +61 -0
- data/src/com/zoho/crm/api/fields/view_type.rb +118 -0
- data/src/com/zoho/crm/api/files/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/files/action_response.rb +10 -0
- data/src/com/zoho/crm/api/files/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/files/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/files/body_wrapper.rb +62 -0
- data/src/com/zoho/crm/api/files/file_body_wrapper.rb +64 -0
- data/src/com/zoho/crm/api/files/file_operations.rb +75 -0
- data/src/com/zoho/crm/api/files/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/files/success_response.rb +121 -0
- data/src/com/zoho/crm/api/header.rb +10 -0
- data/src/com/zoho/crm/api/header_map.rb +55 -0
- data/src/com/zoho/crm/api/initializer.rb +192 -0
- data/src/com/zoho/crm/api/layouts/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/layouts/layout.rb +272 -0
- data/src/com/zoho/crm/api/layouts/layouts_operations.rb +61 -0
- data/src/com/zoho/crm/api/layouts/properties.rb +100 -0
- data/src/com/zoho/crm/api/layouts/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/layouts/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/layouts/section.rb +233 -0
- data/src/com/zoho/crm/api/modules/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/modules/action_response.rb +10 -0
- data/src/com/zoho/crm/api/modules/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/modules/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/modules/argument.rb +80 -0
- data/src/com/zoho/crm/api/modules/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/modules/module.rb +882 -0
- data/src/com/zoho/crm/api/modules/modules_operations.rb +111 -0
- data/src/com/zoho/crm/api/modules/related_list_properties.rb +99 -0
- data/src/com/zoho/crm/api/modules/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/modules/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/modules/success_response.rb +121 -0
- data/src/com/zoho/crm/api/modules/territory.rb +99 -0
- data/src/com/zoho/crm/api/notes/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/notes/action_response.rb +10 -0
- data/src/com/zoho/crm/api/notes/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/notes/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/notes/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/notes/info.rb +118 -0
- data/src/com/zoho/crm/api/notes/note.rb +349 -0
- data/src/com/zoho/crm/api/notes/notes_operations.rb +219 -0
- data/src/com/zoho/crm/api/notes/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/notes/response_wrapper.rb +82 -0
- data/src/com/zoho/crm/api/notes/success_response.rb +121 -0
- data/src/com/zoho/crm/api/notification/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/notification/action_response.rb +10 -0
- data/src/com/zoho/crm/api/notification/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/notification/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/notification/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/notification/info.rb +118 -0
- data/src/com/zoho/crm/api/notification/notification.rb +251 -0
- data/src/com/zoho/crm/api/notification/notification_operations.rb +164 -0
- data/src/com/zoho/crm/api/notification/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/notification/response_wrapper.rb +82 -0
- data/src/com/zoho/crm/api/notification/success_response.rb +121 -0
- data/src/com/zoho/crm/api/org/action_response.rb +10 -0
- data/src/com/zoho/crm/api/org/api_exception.rb +123 -0
- data/src/com/zoho/crm/api/org/file_body_wrapper.rb +62 -0
- data/src/com/zoho/crm/api/org/license_details.rb +156 -0
- data/src/com/zoho/crm/api/org/org.rb +631 -0
- data/src/com/zoho/crm/api/org/org_operations.rb +49 -0
- data/src/com/zoho/crm/api/org/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/org/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/org/success_response.rb +121 -0
- data/src/com/zoho/crm/api/param.rb +10 -0
- data/src/com/zoho/crm/api/parameter_map.rb +54 -0
- data/src/com/zoho/crm/api/profiles/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/profiles/category.rb +99 -0
- data/src/com/zoho/crm/api/profiles/permission_detail.rb +137 -0
- data/src/com/zoho/crm/api/profiles/profile.rb +290 -0
- data/src/com/zoho/crm/api/profiles/profiles_operations.rb +61 -0
- data/src/com/zoho/crm/api/profiles/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/profiles/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/profiles/section.rb +80 -0
- data/src/com/zoho/crm/api/query/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/query/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/query/query_operations.rb +35 -0
- data/src/com/zoho/crm/api/query/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/query/response_wrapper.rb +84 -0
- data/src/com/zoho/crm/api/record/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/record/action_response.rb +10 -0
- data/src/com/zoho/crm/api/record/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/record/api_exception.rb +143 -0
- data/src/com/zoho/crm/api/record/body_wrapper.rb +156 -0
- data/src/com/zoho/crm/api/record/carry_over_tags.rb +99 -0
- data/src/com/zoho/crm/api/record/comment.rb +118 -0
- data/src/com/zoho/crm/api/record/consent.rb +185 -0
- data/src/com/zoho/crm/api/record/convert_action_handler.rb +10 -0
- data/src/com/zoho/crm/api/record/convert_action_response.rb +10 -0
- data/src/com/zoho/crm/api/record/convert_action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/record/convert_body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/record/criteria.rb +135 -0
- data/src/com/zoho/crm/api/record/deleted_record.rb +157 -0
- data/src/com/zoho/crm/api/record/deleted_records_handler.rb +10 -0
- data/src/com/zoho/crm/api/record/deleted_records_wrapper.rb +82 -0
- data/src/com/zoho/crm/api/record/download_handler.rb +10 -0
- data/src/com/zoho/crm/api/record/field.rb +2109 -0
- data/src/com/zoho/crm/api/record/file_body_wrapper.rb +66 -0
- data/src/com/zoho/crm/api/record/file_details.rb +327 -0
- data/src/com/zoho/crm/api/record/file_handler.rb +10 -0
- data/src/com/zoho/crm/api/record/info.rb +118 -0
- data/src/com/zoho/crm/api/record/inventory_line_items.rb +235 -0
- data/src/com/zoho/crm/api/record/lead_converter.rb +194 -0
- data/src/com/zoho/crm/api/record/line_item_product.rb +65 -0
- data/src/com/zoho/crm/api/record/line_tax.rb +118 -0
- data/src/com/zoho/crm/api/record/mass_update.rb +140 -0
- data/src/com/zoho/crm/api/record/mass_update_action_handler.rb +10 -0
- data/src/com/zoho/crm/api/record/mass_update_action_response.rb +10 -0
- data/src/com/zoho/crm/api/record/mass_update_action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/record/mass_update_body_wrapper.rb +156 -0
- data/src/com/zoho/crm/api/record/mass_update_response.rb +10 -0
- data/src/com/zoho/crm/api/record/mass_update_response_handler.rb +10 -0
- data/src/com/zoho/crm/api/record/mass_update_response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/record/mass_update_success_response.rb +121 -0
- data/src/com/zoho/crm/api/record/options.rb +10 -0
- data/src/com/zoho/crm/api/record/participants.rb +116 -0
- data/src/com/zoho/crm/api/record/pricing_details.rb +65 -0
- data/src/com/zoho/crm/api/record/record.rb +192 -0
- data/src/com/zoho/crm/api/record/record_operations.rb +757 -0
- data/src/com/zoho/crm/api/record/recurring_activity.rb +61 -0
- data/src/com/zoho/crm/api/record/remind_at.rb +61 -0
- data/src/com/zoho/crm/api/record/reminder.rb +80 -0
- data/src/com/zoho/crm/api/record/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/record/response_wrapper.rb +82 -0
- data/src/com/zoho/crm/api/record/success_response.rb +161 -0
- data/src/com/zoho/crm/api/record/successful_convert.rb +101 -0
- data/src/com/zoho/crm/api/record/territory.rb +80 -0
- data/src/com/zoho/crm/api/related_lists/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/related_lists/related_list.rb +251 -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 +10 -0
- data/src/com/zoho/crm/api/related_lists/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/related_records/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/related_records/action_response.rb +10 -0
- data/src/com/zoho/crm/api/related_records/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/related_records/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/related_records/body_wrapper.rb +62 -0
- data/src/com/zoho/crm/api/related_records/file_body_wrapper.rb +64 -0
- data/src/com/zoho/crm/api/related_records/related_records_operations.rb +263 -0
- data/src/com/zoho/crm/api/related_records/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/related_records/response_wrapper.rb +84 -0
- data/src/com/zoho/crm/api/related_records/success_response.rb +121 -0
- data/src/com/zoho/crm/api/request_proxy.rb +16 -0
- data/src/com/zoho/crm/api/roles/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/roles/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/roles/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/roles/role.rb +195 -0
- data/src/com/zoho/crm/api/roles/roles_operations.rb +47 -0
- data/src/com/zoho/crm/api/sdk_config.rb +78 -0
- data/src/com/zoho/crm/api/share_records/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/share_records/action_response.rb +10 -0
- data/src/com/zoho/crm/api/share_records/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/share_records/api_exception.rb +129 -0
- data/src/com/zoho/crm/api/share_records/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/share_records/delete_action_handler.rb +10 -0
- data/src/com/zoho/crm/api/share_records/delete_action_response.rb +10 -0
- data/src/com/zoho/crm/api/share_records/delete_action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/share_records/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/share_records/response_wrapper.rb +83 -0
- data/src/com/zoho/crm/api/share_records/share_record.rb +157 -0
- data/src/com/zoho/crm/api/share_records/share_records_operations.rb +128 -0
- data/src/com/zoho/crm/api/share_records/shared_through.rb +100 -0
- data/src/com/zoho/crm/api/share_records/success_response.rb +123 -0
- data/src/com/zoho/crm/api/tags/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/tags/action_response.rb +10 -0
- data/src/com/zoho/crm/api/tags/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/tags/api_exception.rb +131 -0
- data/src/com/zoho/crm/api/tags/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/tags/conflict_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/tags/count_handler.rb +10 -0
- data/src/com/zoho/crm/api/tags/count_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/tags/info.rb +80 -0
- data/src/com/zoho/crm/api/tags/merge_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/tags/record_action_handler.rb +10 -0
- data/src/com/zoho/crm/api/tags/record_action_response.rb +10 -0
- data/src/com/zoho/crm/api/tags/record_action_wrapper.rb +120 -0
- data/src/com/zoho/crm/api/tags/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/tags/response_wrapper.rb +82 -0
- data/src/com/zoho/crm/api/tags/success_response.rb +123 -0
- data/src/com/zoho/crm/api/tags/tag.rb +157 -0
- data/src/com/zoho/crm/api/tags/tags_operations.rb +387 -0
- data/src/com/zoho/crm/api/taxes/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/taxes/action_response.rb +10 -0
- data/src/com/zoho/crm/api/taxes/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/taxes/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/taxes/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/taxes/preference.rb +80 -0
- data/src/com/zoho/crm/api/taxes/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/taxes/response_wrapper.rb +82 -0
- data/src/com/zoho/crm/api/taxes/success_response.rb +121 -0
- data/src/com/zoho/crm/api/taxes/tax.rb +137 -0
- data/src/com/zoho/crm/api/taxes/taxes_operations.rb +136 -0
- data/src/com/zoho/crm/api/territories/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/territories/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/territories/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/territories/territories_operations.rb +47 -0
- data/src/com/zoho/crm/api/territories/territory.rb +234 -0
- data/src/com/zoho/crm/api/user_signature.rb +27 -0
- data/src/com/zoho/crm/api/users/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/users/action_response.rb +10 -0
- data/src/com/zoho/crm/api/users/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/users/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/users/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/users/customize_info.rb +156 -0
- data/src/com/zoho/crm/api/users/info.rb +118 -0
- data/src/com/zoho/crm/api/users/request_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/users/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/users/response_wrapper.rb +82 -0
- data/src/com/zoho/crm/api/users/shift.rb +80 -0
- data/src/com/zoho/crm/api/users/success_response.rb +121 -0
- data/src/com/zoho/crm/api/users/tab_theme.rb +80 -0
- data/src/com/zoho/crm/api/users/territory.rb +99 -0
- data/src/com/zoho/crm/api/users/theme.rb +156 -0
- data/src/com/zoho/crm/api/users/user.rb +696 -0
- data/src/com/zoho/crm/api/users/users_operations.rb +181 -0
- data/src/com/zoho/crm/api/util/api_http_connector.rb +112 -0
- data/src/com/zoho/crm/api/util/api_response.rb +16 -0
- data/src/com/zoho/crm/api/util/choice.rb +9 -0
- data/src/com/zoho/crm/api/util/common_api_handler.rb +236 -0
- data/src/com/zoho/crm/api/util/constants.rb +536 -0
- data/src/com/zoho/crm/api/util/converter.rb +213 -0
- data/src/com/zoho/crm/api/util/data_type_converter.rb +162 -0
- data/src/com/zoho/crm/api/util/downloader.rb +83 -0
- data/src/com/zoho/crm/api/util/form_data_converter.rb +168 -0
- data/src/com/zoho/crm/api/util/header_param_validator.rb +55 -0
- data/src/com/zoho/crm/api/util/json_converter.rb +726 -0
- data/src/com/zoho/crm/api/util/model.rb +5 -0
- data/src/com/zoho/crm/api/util/module_fields_handler.rb +78 -0
- data/src/com/zoho/crm/api/util/stream_wrapper.rb +37 -0
- data/src/com/zoho/crm/api/util/utility.rb +743 -0
- data/src/com/zoho/crm/api/variable_groups/api_exception.rb +121 -0
- data/src/com/zoho/crm/api/variable_groups/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/variable_groups/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/variable_groups/variable_group.rb +137 -0
- data/src/com/zoho/crm/api/variable_groups/variable_groups_operations.rb +66 -0
- data/src/com/zoho/crm/api/variables/action_handler.rb +10 -0
- data/src/com/zoho/crm/api/variables/action_response.rb +10 -0
- data/src/com/zoho/crm/api/variables/action_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/variables/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/variables/body_wrapper.rb +61 -0
- data/src/com/zoho/crm/api/variables/response_handler.rb +10 -0
- data/src/com/zoho/crm/api/variables/response_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/variables/success_response.rb +121 -0
- data/src/com/zoho/crm/api/variables/variable.rb +173 -0
- data/src/com/zoho/crm/api/variables/variables_operations.rb +241 -0
- data/src/resources/JSONDetails.json +1 -0
- data/src/version.rb +3 -0
- metadata +395 -45
- data/lib/ZCRMSDK.rb +0 -14
- data/lib/ZCRMSDK/handler.rb +0 -3290
- data/lib/ZCRMSDK/oauth_client.rb +0 -253
- data/lib/ZCRMSDK/oauth_utility.rb +0 -161
- data/lib/ZCRMSDK/operations.rb +0 -1091
- data/lib/ZCRMSDK/org.rb +0 -174
- data/lib/ZCRMSDK/persistence.rb +0 -129
- data/lib/ZCRMSDK/request.rb +0 -83
- data/lib/ZCRMSDK/response.rb +0 -216
- data/lib/ZCRMSDK/restclient.rb +0 -65
- data/lib/ZCRMSDK/test.rb +0 -5746
- data/lib/ZCRMSDK/utility.rb +0 -309
- data/lib/ZCRMSDK/version.rb +0 -5
data/lib/ZCRMSDK/utility.rb
DELETED
@@ -1,309 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'oauth_utility'
|
4
|
-
require_relative 'oauth_client'
|
5
|
-
require_relative 'restclient'
|
6
|
-
require 'uri'
|
7
|
-
require 'json'
|
8
|
-
require 'logger'
|
9
|
-
require 'net/http'
|
10
|
-
require 'cgi'
|
11
|
-
module ZCRMSDK
|
12
|
-
module Utility
|
13
|
-
# THIS CLASS IS USED TO SET PERSISTENCE HANDLER AND CREDENTIALS RELATED DETAILS
|
14
|
-
class ZCRMConfigUtil
|
15
|
-
def self.get_instance
|
16
|
-
ZCRMConfigUtil.new
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.init(is_to_initialize_oauth, config_details)
|
20
|
-
$CONFIG_PROP_HASH = {}
|
21
|
-
$CONFIG_PROP_HASH = config_details
|
22
|
-
if $CONFIG_PROP_HASH[APIConstants::API_BASEURL].nil?
|
23
|
-
$CONFIG_PROP_HASH[APIConstants::API_BASEURL] = 'https://www.zohoapis.com'
|
24
|
-
end
|
25
|
-
if $CONFIG_PROP_HASH[APIConstants::API_VERSION].nil?
|
26
|
-
$CONFIG_PROP_HASH[APIConstants::API_VERSION] = 'v2'
|
27
|
-
end
|
28
|
-
if $CONFIG_PROP_HASH[APIConstants::SANDBOX].nil?
|
29
|
-
$CONFIG_PROP_HASH[APIConstants::SANDBOX] = 'false'
|
30
|
-
end
|
31
|
-
if $CONFIG_PROP_HASH[APIConstants::CONSOLE].nil? || $CONFIG_PROP_HASH[APIConstants::CONSOLE] != 'true'
|
32
|
-
$CONFIG_PROP_HASH[APIConstants::CONSOLE] = 'false'
|
33
|
-
end
|
34
|
-
if $CONFIG_PROP_HASH[APIConstants::LOGPATH].nil?
|
35
|
-
$CONFIG_PROP_HASH[APIConstants::LOGPATH] = nil
|
36
|
-
end
|
37
|
-
if is_to_initialize_oauth
|
38
|
-
ZCRMSDK::OAuthClient::ZohoOAuth.get_instance(config_details)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def self.get_config_value(key_value)
|
43
|
-
if $CONFIG_PROP_HASH.has_key?(key_value) && !$CONFIG_PROP_HASH[key_value].nil?
|
44
|
-
$CONFIG_PROP_HASH[key_value].dup
|
45
|
-
else
|
46
|
-
return ' '
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def self.get_api_base_url
|
51
|
-
get_config_value(APIConstants::API_BASEURL)
|
52
|
-
end
|
53
|
-
|
54
|
-
def self.get_api_version
|
55
|
-
get_config_value(APIConstants::API_VERSION)
|
56
|
-
end
|
57
|
-
|
58
|
-
def get_access_token
|
59
|
-
user_email = RestClient::ZCRMRestClient.current_user_email
|
60
|
-
if user_email.nil?
|
61
|
-
raise ZCRMException.new('current_user_email', APIConstants::RESPONSECODE_BAD_REQUEST, 'Current user should either be set in ZCRMRestClient or in configuration array', 'CURRENT USER NOT SET')
|
62
|
-
end
|
63
|
-
|
64
|
-
client_ins = OAuthClient::ZohoOAuth.get_client_instance
|
65
|
-
client_ins.get_access_token(user_email)
|
66
|
-
end
|
67
|
-
end
|
68
|
-
# THIS CLASS IS USED TO CONSTUCT API SUPPORTED JSON
|
69
|
-
class CommonUtil
|
70
|
-
def self.create_api_supported_input_json(input_json, api_key)
|
71
|
-
input_json = {} if input_json.nil?
|
72
|
-
input_json_arr = []
|
73
|
-
input_json_arr.push(input_json)
|
74
|
-
req_body_json = {}
|
75
|
-
req_body_json[api_key] = input_json_arr
|
76
|
-
req_body_json
|
77
|
-
end
|
78
|
-
end
|
79
|
-
# THIS CLASS IS USED TO LOG THE SDK RELATED ACTIVITY
|
80
|
-
class SDKLogger
|
81
|
-
def self.add_log(message, level, exception = nil)
|
82
|
-
if $CONFIG_PROP_HASH.empty?
|
83
|
-
raise exception, 'Please Initialize the SDK before using it!'
|
84
|
-
end
|
85
|
-
|
86
|
-
unless $CONFIG_PROP_HASH[APIConstants::LOGPATH].nil?
|
87
|
-
logger = Logger.new File.new($CONFIG_PROP_HASH[APIConstants::LOGPATH].dup, 'a')
|
88
|
-
print_log(logger, message, level, exception)
|
89
|
-
end
|
90
|
-
|
91
|
-
if $CONFIG_PROP_HASH[APIConstants::CONSOLE] == 'true'
|
92
|
-
logger = Logger.new STDOUT
|
93
|
-
print_log(logger, message, level, exception)
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
def self.print_log(logger, message, level, exception)
|
98
|
-
unless exception.nil?
|
99
|
-
message += "; Exception Class::#{exception.class}; exception occured in #{exception.url}"
|
100
|
-
end
|
101
|
-
|
102
|
-
case level
|
103
|
-
when 'error'
|
104
|
-
logger.error(message)
|
105
|
-
when 'info'
|
106
|
-
logger.info(message)
|
107
|
-
when 'warning'
|
108
|
-
logger.warning(message)
|
109
|
-
when 'fatal'
|
110
|
-
logger.fatal(message)
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
114
|
-
# THIS CLASS CONSISTS OF COMMON CONSTANTS FREQUENTLY USED
|
115
|
-
class APIConstants
|
116
|
-
ERROR = 'error'
|
117
|
-
REQUEST_METHOD_GET = 'GET'
|
118
|
-
REQUEST_METHOD_POST = 'POST'
|
119
|
-
REQUEST_METHOD_PUT = 'PUT'
|
120
|
-
REQUEST_METHOD_DELETE = 'DELETE'
|
121
|
-
REQUEST_METHOD_PATCH = 'PATCH'
|
122
|
-
OAUTH_HEADER_PREFIX = 'Zoho-oauthtoken '
|
123
|
-
AUTHORIZATION = 'Authorization'
|
124
|
-
API_NAME = 'api_name'
|
125
|
-
INVALID_ID_MSG = 'The given id seems to be invalid.'
|
126
|
-
API_MAX_RECORDS_MSG = 'Cannot process more than 100 records at a time.'
|
127
|
-
INVALID_DATA = 'INVALID_DATA'
|
128
|
-
CODE_SUCCESS = 'SUCCESS'
|
129
|
-
STATUS_SUCCESS = 'success'
|
130
|
-
STATUS_ERROR = 'error'
|
131
|
-
LEADS = 'Leads'
|
132
|
-
ACCOUNTS = 'Accounts'
|
133
|
-
CONTACTS = 'Contacts'
|
134
|
-
DEALS = 'Deals'
|
135
|
-
QUOTES = 'Quotes'
|
136
|
-
SALESORDERS = 'SalesOrders'
|
137
|
-
INVOICES = 'Invoices'
|
138
|
-
PURCHASEORDERS = 'PurchaseOrders'
|
139
|
-
PER_PAGE = 'per_page'
|
140
|
-
PAGE = 'page'
|
141
|
-
COUNT = 'count'
|
142
|
-
MORE_RECORDS = 'more_records'
|
143
|
-
MESSAGE = 'message'
|
144
|
-
CODE = 'code'
|
145
|
-
STATUS = 'status'
|
146
|
-
DETAILS = 'details'
|
147
|
-
DATA = 'data'
|
148
|
-
VARIABLE = 'variables'
|
149
|
-
VARIABLE_GROUP = 'variable_groups'
|
150
|
-
INFO = 'info'
|
151
|
-
FIELDS = 'fields'
|
152
|
-
LAYOUTS = 'layouts'
|
153
|
-
TAG = 'tags'
|
154
|
-
CUSTOM_VIEWS = 'custom_views'
|
155
|
-
MODULES = 'modules'
|
156
|
-
RELATED_LISTS = 'related_lists'
|
157
|
-
ORG = 'org'
|
158
|
-
ROLES = 'roles'
|
159
|
-
PROFILES = 'profiles'
|
160
|
-
USERS = 'users'
|
161
|
-
TAXES = 'taxes'
|
162
|
-
CONSOLE = 'log_in_console'
|
163
|
-
LOGPATH = 'application_log_file_path'
|
164
|
-
CUSTOM_FUNCTIONS = 'custom_functions'
|
165
|
-
RESPONSECODE_OK = 200
|
166
|
-
RESPONSECODE_CREATED = 201
|
167
|
-
RESPONSECODE_ACCEPTED = 202
|
168
|
-
RESPONSECODE_NO_CONTENT = 204
|
169
|
-
RESPONSECODE_MOVED_PERMANENTLY = 301
|
170
|
-
RESPONSECODE_MOVED_TEMPORARILY = 302
|
171
|
-
RESPONSECODE_NOT_MODIFIED = 304
|
172
|
-
RESPONSECODE_BAD_REQUEST = 400
|
173
|
-
RESPONSECODE_AUTHORIZATION_ERROR = 401
|
174
|
-
RESPONSECODE_FORBIDDEN = 403
|
175
|
-
RESPONSECODE_NOT_FOUND = 404
|
176
|
-
RESPONSECODE_METHOD_NOT_ALLOWED = 405
|
177
|
-
RESPONSECODE_REQUEST_ENTITY_TOO_LARGE = 413
|
178
|
-
RESPONSECODE_UNSUPPORTED_MEDIA_TYPE = 415
|
179
|
-
RESPONSECODE_TOO_MANY_REQUEST = 429
|
180
|
-
RESPONSECODE_INTERNAL_SERVER_ERROR = 500
|
181
|
-
RESPONSECODE_INVALID_INPUT = 0
|
182
|
-
SANDBOX = 'sandbox'
|
183
|
-
API_BASEURL = 'api_base_url'
|
184
|
-
API_VERSION = 'api_version'
|
185
|
-
CURRENT_USER_EMAIL = 'current_user_email'
|
186
|
-
ACTION = 'action'
|
187
|
-
DUPLICATE_FIELD = 'duplicate_field'
|
188
|
-
NO_CONTENT = 'No Content'
|
189
|
-
FAULTY_RESPONSE_CODES = [RESPONSECODE_NO_CONTENT, RESPONSECODE_NOT_FOUND, RESPONSECODE_AUTHORIZATION_ERROR, RESPONSECODE_BAD_REQUEST, RESPONSECODE_FORBIDDEN, RESPONSECODE_INTERNAL_SERVER_ERROR, RESPONSECODE_METHOD_NOT_ALLOWED, RESPONSECODE_MOVED_PERMANENTLY, RESPONSECODE_MOVED_TEMPORARILY, RESPONSECODE_REQUEST_ENTITY_TOO_LARGE, RESPONSECODE_TOO_MANY_REQUEST, RESPONSECODE_UNSUPPORTED_MEDIA_TYPE].freeze
|
190
|
-
ATTACHMENT_URL = 'attachmentUrl'
|
191
|
-
ACCESS_TOKEN_EXPIRY = 'X-ACCESSTOKEN-RESET'
|
192
|
-
CURR_WINDOW_API_LIMIT = 'X-RATELIMIT-LIMIT'
|
193
|
-
CURR_WINDOW_REMAINING_API_COUNT = 'X-RATELIMIT-REMAINING'
|
194
|
-
CURR_WINDOW_RESET = 'X-RATELIMIT-RESET'
|
195
|
-
API_COUNT_REMAINING_FOR_THE_DAY = 'X-RATELIMIT-DAY-REMAINING'
|
196
|
-
API_LIMIT_FOR_THE_DAY = 'X-RATELIMIT-DAY-LIMIT'
|
197
|
-
end
|
198
|
-
# THIS CLASS IS USED TO FIRE THE API REQUEST
|
199
|
-
class ZohoHTTPConnector
|
200
|
-
attr_accessor :url, :req_headers, :req_method, :req_params, :req_body, :api_key, :is_bulk_req, :form_data
|
201
|
-
def self.get_instance(url, params = nil, headers = nil, body = nil, method = nil, api_key = 'data', is_bulk_req = false, form_data = nil)
|
202
|
-
ZohoHTTPConnector.new(url, params, headers, body, method, api_key, is_bulk_req, form_data)
|
203
|
-
end
|
204
|
-
|
205
|
-
def initialize(url, params, headers, body, method, api_key, is_bulk_req, form_data = nil)
|
206
|
-
@url = url
|
207
|
-
@req_headers = headers
|
208
|
-
@req_method = method
|
209
|
-
@req_params = params
|
210
|
-
@req_body = body
|
211
|
-
@api_key = api_key
|
212
|
-
@req_form_data = form_data
|
213
|
-
@is_bulk_req = is_bulk_req
|
214
|
-
end
|
215
|
-
|
216
|
-
def trigger_request
|
217
|
-
unless @req_params.nil?
|
218
|
-
@req_params.each do |param_key, value|
|
219
|
-
@req_params[param_key] = CGI.escape(value) if value.is_a? String
|
220
|
-
end
|
221
|
-
end
|
222
|
-
query_string = @req_params.to_a.map { |x| "#{x[0]}=#{x[1]}" }.join('&')
|
223
|
-
if !query_string.nil? && (query_string.strip != '')
|
224
|
-
@url += '?' + query_string
|
225
|
-
end
|
226
|
-
url = URI(@url)
|
227
|
-
http = Net::HTTP.new(url.host, url.port)
|
228
|
-
http.use_ssl = true
|
229
|
-
if @req_method == APIConstants::REQUEST_METHOD_GET
|
230
|
-
req = Net::HTTP::Get.new(url.request_uri)
|
231
|
-
elsif @req_method == APIConstants::REQUEST_METHOD_POST
|
232
|
-
req = Net::HTTP::Post.new(url.request_uri)
|
233
|
-
req.body = @req_body.to_s
|
234
|
-
elsif @req_method == APIConstants::REQUEST_METHOD_PUT
|
235
|
-
req = Net::HTTP::Put.new(url.request_uri)
|
236
|
-
req.body = @req_body.to_s
|
237
|
-
elsif @req_method == APIConstants::REQUEST_METHOD_PATCH
|
238
|
-
req = Net::HTTP::Patch.new(url.request_uri)
|
239
|
-
req.body = @req_body.to_s
|
240
|
-
elsif @req_method == APIConstants::REQUEST_METHOD_DELETE
|
241
|
-
req = Net::HTTP::Delete.new(url.request_uri)
|
242
|
-
end
|
243
|
-
@req_headers.each { |key, value| req.add_field(key, value) }
|
244
|
-
unless @req_form_data.nil?
|
245
|
-
req.set_form @req_form_data, 'multipart/form-data'
|
246
|
-
end
|
247
|
-
response = http.request(req)
|
248
|
-
response
|
249
|
-
end
|
250
|
-
|
251
|
-
def self.set_url(url)
|
252
|
-
@url = url
|
253
|
-
end
|
254
|
-
|
255
|
-
def self.get_url
|
256
|
-
@url
|
257
|
-
end
|
258
|
-
|
259
|
-
def add_http_header(key, value)
|
260
|
-
@req_headers[key] = value
|
261
|
-
end
|
262
|
-
|
263
|
-
def get_http_headers
|
264
|
-
req_headers
|
265
|
-
end
|
266
|
-
|
267
|
-
def set_http_request_method(method)
|
268
|
-
@req_method = method
|
269
|
-
end
|
270
|
-
|
271
|
-
def get_http_request_method
|
272
|
-
@req_method
|
273
|
-
end
|
274
|
-
|
275
|
-
def set_request_body(req_body)
|
276
|
-
@req_body = req_body
|
277
|
-
end
|
278
|
-
|
279
|
-
def get_request_body
|
280
|
-
@req_body
|
281
|
-
end
|
282
|
-
|
283
|
-
def add_http_request_params(key, value)
|
284
|
-
@req_params.store(key, value)
|
285
|
-
end
|
286
|
-
|
287
|
-
def get_http_request_params
|
288
|
-
@req_params
|
289
|
-
end
|
290
|
-
end
|
291
|
-
# THIS CLASS IS USED TO HANDLE ZCRM EXCEPTION
|
292
|
-
class ZCRMException < StandardError
|
293
|
-
attr_accessor :url, :status_code, :error_message, :exception_code, :error_details, :error_content
|
294
|
-
def initialize(url, status_code, err_message, exception_code = 'error', details = nil, content = nil)
|
295
|
-
@url = url
|
296
|
-
@status_code = status_code
|
297
|
-
@error_message = err_message
|
298
|
-
@exception_code = exception_code
|
299
|
-
@error_details = details
|
300
|
-
@error_content = content
|
301
|
-
SDKLogger.add_log(error_message, 'error', self)
|
302
|
-
end
|
303
|
-
|
304
|
-
def self.get_instance(url, status_code, err_message, exception_code = 'error', details = nil, content = nil)
|
305
|
-
ZCRMException.new(url, status_code, err_message, exception_code, details, content)
|
306
|
-
end
|
307
|
-
end
|
308
|
-
end
|
309
|
-
end
|