diff --git a/rippling/rippling-api.rs.patch.json b/rippling/rippling-api.rs.patch.json index 675828c..0aa5499 100644 --- a/rippling/rippling-api.rs.patch.json +++ b/rippling/rippling-api.rs.patch.json @@ -11,232 +11,232 @@ "op": "add", "path": "/paths/~1platform~1api~1app_detail~1app_matching_users/get/x-rust", "value": { - "example": "/// GET Matching App Users\n/// \n/// Returns matching users and their app IDs based on the app handles.\n/// \n/// Note:There could be multiple instances of the same app. In this case, the API will return all instances in the format app_handle_app_owner_id.\n/// \n/// \n/// **Parameters:**\n/// \n/// - `app_handles: Option`: CSV of app handles. See GET /app_detail/app_handles\n/// \nasync fn example_i_application_management_get_app_app_matching_users() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::GetAppAppMatchingUsersResponse = client\n .i_application_management()\n .get_app_app_matching_users(Some(\"some-string\".to_string()))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/i_application_management/struct.IApplicationManagement.html#method.get_app_app_matching_users" + "example": "/// GET Matching App Users\n/// \n/// Returns matching users and their app IDs based on the app handles.\n/// \n/// Note:There could be multiple instances of the same app. In this case, the API will return all instances in the format app_handle_app_owner_id.\n/// \n/// \n/// **Parameters:**\n/// \n/// - `app_handles: Option`: CSV of app handles. See GET /app_detail/app_handles\n/// \nasync fn example_application_management_get_app_app_matching_users() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::GetAppAppMatchingUsersResponse = client\n .application_management()\n .get_app_app_matching_users(Some(\"some-string\".to_string()))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/application_management/struct.ApplicationManagement.html#method.get_app_app_matching_users" } }, { "op": "add", "path": "/paths/~1platform~1api~1ats_candidates~1push_candidate/post/x-rust", "value": { - "example": "/// POST New Candidate\n/// \n/// Pushes a candidate from an applicant tracking system directly into the Rippling onboarding flow. Please note, this endpoint is only available to applications integrating with OAuth2.0.\n/// \n/// NOTE: This endpoint is NOT available for use with Rippling customer API Keys.\nasync fn example_h_ats_post_ats_candidates_push_candidate() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Candidate = client\n .h_ats()\n .post_ats_candidates_push_candidate(&rippling_api::types::Candidate {\n name: Some(\"some-string\".to_string()),\n email: Some(\"some-string\".to_string()),\n job_title: Some(\"some-string\".to_string()),\n phone_number: Some(\"some-string\".to_string()),\n candidate_id: Some(\"some-string\".to_string()),\n start_date: Some(chrono::Utc::now().date_naive()),\n salary_unit: Some(rippling_api::types::SalaryUnit::PayPeriod),\n salary_per_unit: Some(3.14 as f64),\n signing_bonus: Some(3.14 as f64),\n currency: Some(\"some-string\".to_string()),\n equity_shares: Some(4 as i64),\n department: Some(\"some-string\".to_string()),\n employment_type: Some(rippling_api::types::CandidateEmploymentType::Temp),\n work_location: Some(\"some-string\".to_string()),\n attachments: Some(vec![rippling_api::types::Attachments {\n file_name: Some(\"some-string\".to_string()),\n file_url: Some(\"some-string\".to_string()),\n }]),\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/h_ats/struct.HAts.html#method.post_ats_candidates_push_candidate" + "example": "/// POST New Candidate\n/// \n/// Pushes a candidate from an applicant tracking system directly into the Rippling onboarding flow. Please note, this endpoint is only available to applications integrating with OAuth2.0.\n/// \n/// NOTE: This endpoint is NOT available for use with Rippling customer API Keys.\nasync fn example_ats_post_candidates_push_candidate() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Candidate = client\n .ats()\n .post_candidates_push_candidate(&rippling_api::types::Candidate {\n name: Some(\"some-string\".to_string()),\n email: Some(\"some-string\".to_string()),\n job_title: Some(\"some-string\".to_string()),\n phone_number: Some(\"some-string\".to_string()),\n candidate_id: Some(\"some-string\".to_string()),\n start_date: Some(chrono::Utc::now().date_naive()),\n salary_unit: Some(rippling_api::types::SalaryUnit::PayPeriod),\n salary_per_unit: Some(3.14 as f64),\n signing_bonus: Some(3.14 as f64),\n currency: Some(\"some-string\".to_string()),\n equity_shares: Some(4 as i64),\n department: Some(\"some-string\".to_string()),\n employment_type: Some(rippling_api::types::CandidateEmploymentType::Temp),\n work_location: Some(\"some-string\".to_string()),\n attachments: Some(vec![rippling_api::types::Attachments {\n file_name: Some(\"some-string\".to_string()),\n file_url: Some(\"some-string\".to_string()),\n }]),\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/ats/struct.Ats.html#method.post_candidates_push_candidate" } }, { "op": "add", "path": "/paths/~1platform~1api~1companies~1current/get/x-rust", "value": { - "example": "/// GET Current Company\n/// \n/// Returns the currently accessible company for the given token. Please note, the returned fields depend on the scopes that are enabled for your access token or API key.\nasync fn example_a_companies_get_companies() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Company = client.a_companies().get_companies().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/a_companies/struct.ACompanies.html#method.get_companies" + "example": "/// GET Current Company\n/// \n/// Returns the currently accessible company for the given token. Please note, the returned fields depend on the scopes that are enabled for your access token or API key.\nasync fn example_companies_get() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Company = client.companies().get().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/companies/struct.Companies.html#method.get" } }, { "op": "add", "path": "/paths/~1platform~1api~1company_activity/get/x-rust", "value": { - "example": "/// GET Company Activity\n/// \n/// Retrieves the activity for a given company.\n/// \n/// The most reliable method to ingest all activity from Rippling is to use a pagination cursor via the 'next' parameter. This will ensure that events are not skipped or duplicated due to the lack of timestamp precision.\n/// \n/// The general sequence of steps to leverage the next parameter:\n/// \n/// 1. Issue an initial request using startDate with a value set to some date in the last 90 days\n/// 2. Retrieve the next page of events through the next value from the response data.\n/// 3. Issue the paginated request\n/// 4. Retrieve the next page of events through the next value from the response data\n/// 5. Pause and repeat the previous step\n/// \n/// \n/// **Parameters:**\n/// \n/// - `end_date: Option`: Timestamp to list activity before (inclusive).\n/// - `limit: Option`: Specifies the number of results to page (maximum: 1000) (default: 1000)\n/// - `next: Option`: Specifies the pagination cursor to the next page\n/// - `start_date: Option`: Timestamp to list activity after (inclusive). This should be less than 90 days from now. Defaults to 90 days.\nasync fn example_a_companies_get_company_activity() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::GetCompanyActivityResponse = client\n .a_companies()\n .get_company_activity(\n Some(chrono::Utc::now().date_naive()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(chrono::Utc::now().date_naive()),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/a_companies/struct.ACompanies.html#method.get_company_activity" + "example": "/// GET Company Activity\n/// \n/// Retrieves the activity for a given company.\n/// \n/// The most reliable method to ingest all activity from Rippling is to use a pagination cursor via the 'next' parameter. This will ensure that events are not skipped or duplicated due to the lack of timestamp precision.\n/// \n/// The general sequence of steps to leverage the next parameter:\n/// \n/// 1. Issue an initial request using startDate with a value set to some date in the last 90 days\n/// 2. Retrieve the next page of events through the next value from the response data.\n/// 3. Issue the paginated request\n/// 4. Retrieve the next page of events through the next value from the response data\n/// 5. Pause and repeat the previous step\n/// \n/// \n/// **Parameters:**\n/// \n/// - `end_date: Option`: Timestamp to list activity before (inclusive).\n/// - `limit: Option`: Specifies the number of results to page (maximum: 1000) (default: 1000)\n/// - `next: Option`: Specifies the pagination cursor to the next page\n/// - `start_date: Option`: Timestamp to list activity after (inclusive). This should be less than 90 days from now. Defaults to 90 days.\nasync fn example_companies_get_company_activity() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::GetCompanyActivityResponse = client\n .companies()\n .get_company_activity(\n Some(chrono::Utc::now().date_naive()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(chrono::Utc::now().date_naive()),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/companies/struct.Companies.html#method.get_company_activity" } }, { "op": "add", "path": "/paths/~1platform~1api~1company_leave_types/get/x-rust", "value": { - "example": "/// GET Company Leave Types\n/// \n/// Retrieves the current company leave types. The query can be filtered by managedBy field.\n/// \n/// **Parameters:**\n/// \n/// - `managed_by: Option`\nasync fn example_a_companies_get_company_leave_types() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .a_companies()\n .get_company_leave_types(Some(\"some-string\".to_string()))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/a_companies/struct.ACompanies.html#method.get_company_leave_types" + "example": "/// GET Company Leave Types\n/// \n/// Retrieves the current company leave types. The query can be filtered by managedBy field.\n/// \n/// **Parameters:**\n/// \n/// - `managed_by: Option`\nasync fn example_companies_get_company_leave_types() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .companies()\n .get_company_leave_types(Some(\"some-string\".to_string()))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/companies/struct.Companies.html#method.get_company_leave_types" } }, { "op": "add", "path": "/paths/~1platform~1api~1custom_fields/get/x-rust", "value": { - "example": "/// GET Custom Fields\n/// \n/// Returns the custom fields for the given company.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\nasync fn example_a_companies_get_custom_fields() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .a_companies()\n .get_custom_fields(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/a_companies/struct.ACompanies.html#method.get_custom_fields" + "example": "/// GET Custom Fields\n/// \n/// Returns the custom fields for the given company.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\nasync fn example_companies_get_custom_fields() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .companies()\n .get_custom_fields(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/companies/struct.Companies.html#method.get_custom_fields" } }, { "op": "add", "path": "/paths/~1platform~1api~1departments/get/x-rust", "value": { - "example": "/// GET Departments\n/// \n/// Returns a list of departments for the given company.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\nasync fn example_a_companies_get_departments() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec> = client\n .a_companies()\n .get_departments(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/a_companies/struct.ACompanies.html#method.get_departments" + "example": "/// GET Departments\n/// \n/// Returns a list of departments for the given company.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\nasync fn example_companies_get_departments() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec> = client\n .companies()\n .get_departments(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/companies/struct.Companies.html#method.get_departments" } }, { "op": "add", "path": "/paths/~1platform~1api~1employees/get/x-rust", "value": { - "example": "/// GET Employees\n/// \n/// Retrieves the list of active employees currently provisioned within the application. The fields retrieved depend on the employee scopes that you have access to for your access token or API key. The only guarenteed fields include id, personalEmail, and roleState.\n/// \n/// For optimal performance, ensure pagination is used via our limit and offset parameters. Pagination should be set to a maximum of 100.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\nasync fn example_b_employees_get_employees() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .b_employees()\n .get_employees(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/b_employees/struct.BEmployees.html#method.get_employees" + "example": "/// GET Employees\n/// \n/// Retrieves the list of active employees currently provisioned within the application. The fields retrieved depend on the employee scopes that you have access to for your access token or API key. The only guarenteed fields include id, personalEmail, and roleState.\n/// \n/// For optimal performance, ensure pagination is used via our limit and offset parameters. Pagination should be set to a maximum of 100.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\nasync fn example_employees_get() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .employees()\n .get(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/employees/struct.Employees.html#method.get" } }, { "op": "add", "path": "/paths/~1platform~1api~1employees~1include_terminated/get/x-rust", "value": { - "example": "/// GET Employees (Including Terminated)\n/// \n/// This endpoint is similar to the active employees endpoint, but instead, it includes both active and terminated employees.\n/// \n/// For optimal performance, ensure pagination is used via our limit and offset parameters. Pagination should be set to a maximum of 100.\n/// \n/// **Parameters:**\n/// \n/// - `ein: Option`: Employer identification number, also known as the Federal Emplower Identification Number or the Federal Tax Identification Number.\n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\n/// - `send_all_roles: Option`: For integrations that rely on provisioning, this parameter can be used to identify non provisioned roles for compliance purposes. TRUE will return every employee from the company (bypassing any access rules).\nasync fn example_b_employees_get_employees_include_terminated() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .b_employees()\n .get_employees_include_terminated(\n Some(4 as i64),\n Some(4 as i64),\n Some(4 as i64),\n Some(false),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/b_employees/struct.BEmployees.html#method.get_employees_include_terminated" + "example": "/// GET Employees (Including Terminated)\n/// \n/// This endpoint is similar to the active employees endpoint, but instead, it includes both active and terminated employees.\n/// \n/// For optimal performance, ensure pagination is used via our limit and offset parameters. Pagination should be set to a maximum of 100.\n/// \n/// **Parameters:**\n/// \n/// - `ein: Option`: Employer identification number, also known as the Federal Emplower Identification Number or the Federal Tax Identification Number.\n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\n/// - `send_all_roles: Option`: For integrations that rely on provisioning, this parameter can be used to identify non provisioned roles for compliance purposes. TRUE will return every employee from the company (bypassing any access rules).\nasync fn example_employees_get_include_terminated() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .employees()\n .get_include_terminated(Some(4 as i64), Some(4 as i64), Some(4 as i64), Some(false))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/employees/struct.Employees.html#method.get_include_terminated" } }, { "op": "add", "path": "/paths/~1platform~1api~1employees~1{employeeId}/get/x-rust", "value": { - "example": "/// GET Employee\n/// \n/// Retrieves the information for a single employee based on the scopes that your API key or access token have access to.\n/// \n/// **Parameters:**\n/// \n/// - `employee_id: &'astr`: Unique identifier for the employee within Rippling. (required)\nasync fn example_b_employees_get_employees_employee_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Employee = client\n .b_employees()\n .get_employees_employee_id(\"some-string\")\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/b_employees/struct.BEmployees.html#method.get_employees_employee_id" + "example": "/// GET Employee\n/// \n/// Retrieves the information for a single employee based on the scopes that your API key or access token have access to.\n/// \n/// **Parameters:**\n/// \n/// - `employee_id: &'astr`: Unique identifier for the employee within Rippling. (required)\nasync fn example_employees_get_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Employee = client.employees().get_id(\"some-string\").await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/employees/struct.Employees.html#method.get_id" } }, { "op": "add", "path": "/paths/~1platform~1api~1groups/get/x-rust", "value": { - "example": "/// GET Groups\n/// \n/// Please note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n/// \n/// Lists the current third-party groups for an organization.\nasync fn example_f_groups_get_groups() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client.f_groups().get_groups().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/f_groups/struct.FGroups.html#method.get_groups" + "example": "/// GET Groups\n/// \n/// Please note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n/// \n/// Lists the current third-party groups for an organization.\nasync fn example_groups_get() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client.groups().get().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/groups/struct.Groups.html#method.get" } }, { "op": "add", "path": "/paths/~1platform~1api~1groups/post/x-rust", "value": { - "example": "/// POST Groups\n/// \n/// Creates a generic group, that can be associated within the third-party application.\nasync fn example_f_groups_post_groups() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Group = client\n .f_groups()\n .post_groups(&rippling_api::types::PostGroupsRequestBody {\n name: Some(\"some-string\".to_string()),\n spoke_id: Some(\"some-string\".to_string()),\n users: Some(vec![\"some-string\".to_string()]),\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/f_groups/struct.FGroups.html#method.post_groups" + "example": "/// POST Groups\n/// \n/// Creates a generic group, that can be associated within the third-party application.\nasync fn example_groups_post() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Group = client\n .groups()\n .post(&rippling_api::types::PostGroupsRequestBody {\n name: Some(\"some-string\".to_string()),\n spoke_id: Some(\"some-string\".to_string()),\n users: Some(vec![\"some-string\".to_string()]),\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/groups/struct.Groups.html#method.post" } }, { "op": "add", "path": "/paths/~1platform~1api~1groups~1{groupId}/delete/x-rust", "value": { - "example": "/// DELETE Group\n/// \n/// Please note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n/// \n/// Deletes the specified group.\n/// \n/// **Parameters:**\n/// \n/// - `group_id: i64`: Unique identifier for the group within Rippling. (required)\nasync fn example_f_groups_delete_groups_group_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n client.f_groups().delete_groups_group_id(4 as i64).await?;\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/f_groups/struct.FGroups.html#method.delete_groups_group_id" + "example": "/// DELETE Group\n/// \n/// Please note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n/// \n/// Deletes the specified group.\n/// \n/// **Parameters:**\n/// \n/// - `group_id: i64`: Unique identifier for the group within Rippling. (required)\nasync fn example_groups_delete_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n client.groups().delete_id(4 as i64).await?;\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/groups/struct.Groups.html#method.delete_id" } }, { "op": "add", "path": "/paths/~1platform~1api~1groups~1{groupId}/get/x-rust", "value": { - "example": "/// GET Group\n/// \n/// Please note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n/// \n/// **Parameters:**\n/// \n/// - `group_id: i64`: Unique identifier for the group within Rippling. (required)\nasync fn example_f_groups_get_groups_group_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Group = client\n .f_groups()\n .get_groups_group_id(\n 4 as i64,\n &rippling_api::types::GroupUpdatePayload {\n name: Some(\"some-string\".to_string()),\n spoke_id: Some(\"some-string\".to_string()),\n users: Some(vec![serde_json::Value::String(\"some-string\".to_string())]),\n version: Some(\"some-string\".to_string()),\n },\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/f_groups/struct.FGroups.html#method.get_groups_group_id" + "example": "/// GET Group\n/// \n/// Please note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n/// \n/// **Parameters:**\n/// \n/// - `group_id: i64`: Unique identifier for the group within Rippling. (required)\nasync fn example_groups_get_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Group = client\n .groups()\n .get_id(\n 4 as i64,\n &rippling_api::types::GroupUpdatePayload {\n name: Some(\"some-string\".to_string()),\n spoke_id: Some(\"some-string\".to_string()),\n users: Some(vec![serde_json::Value::String(\"some-string\".to_string())]),\n version: Some(\"some-string\".to_string()),\n },\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/groups/struct.Groups.html#method.get_id" } }, { "op": "add", "path": "/paths/~1platform~1api~1groups~1{groupId}/patch/x-rust", "value": { - "example": "/// PATCH Group\n/// \n/// Please note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n/// \n/// Using the PUT method, all of the group fields will be updated, even if the corresponding parameter is missing. If the PATCH method is used, and a param is missing, its value won’t be changed.\n/// \n/// **Parameters:**\n/// \n/// - `group_id: i64`: Unique identifier for the group within Rippling. (required)\nasync fn example_f_groups_patch_groups_group_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Group = client\n .f_groups()\n .patch_groups_group_id(\n 4 as i64,\n &rippling_api::types::GroupUpdatePayload {\n name: Some(\"some-string\".to_string()),\n spoke_id: Some(\"some-string\".to_string()),\n users: Some(vec![serde_json::Value::String(\"some-string\".to_string())]),\n version: Some(\"some-string\".to_string()),\n },\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/f_groups/struct.FGroups.html#method.patch_groups_group_id" + "example": "/// PATCH Group\n/// \n/// Please note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n/// \n/// Using the PUT method, all of the group fields will be updated, even if the corresponding parameter is missing. If the PATCH method is used, and a param is missing, its value won’t be changed.\n/// \n/// **Parameters:**\n/// \n/// - `group_id: i64`: Unique identifier for the group within Rippling. (required)\nasync fn example_groups_patch_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Group = client\n .groups()\n .patch_id(\n 4 as i64,\n &rippling_api::types::GroupUpdatePayload {\n name: Some(\"some-string\".to_string()),\n spoke_id: Some(\"some-string\".to_string()),\n users: Some(vec![serde_json::Value::String(\"some-string\".to_string())]),\n version: Some(\"some-string\".to_string()),\n },\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/groups/struct.Groups.html#method.patch_id" } }, { "op": "add", "path": "/paths/~1platform~1api~1groups~1{groupId}/put/x-rust", "value": { - "example": "/// PUT Group\n/// \n/// Please note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n/// \n/// Using the PUT method, all of the group fields will be updated, even if the corresponding parameter is missing. If the PATCH method is used, and a param is missing, its value won’t be changed.\n/// \n/// **Parameters:**\n/// \n/// - `group_id: i64`: Unique identifier for the group within Rippling. (required)\nasync fn example_f_groups_put_groups_group_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Group = client\n .f_groups()\n .put_groups_group_id(\n 4 as i64,\n &rippling_api::types::GroupUpdatePayload {\n name: Some(\"some-string\".to_string()),\n spoke_id: Some(\"some-string\".to_string()),\n users: Some(vec![serde_json::Value::String(\"some-string\".to_string())]),\n version: Some(\"some-string\".to_string()),\n },\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/f_groups/struct.FGroups.html#method.put_groups_group_id" + "example": "/// PUT Group\n/// \n/// Please note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n/// \n/// Using the PUT method, all of the group fields will be updated, even if the corresponding parameter is missing. If the PATCH method is used, and a param is missing, its value won’t be changed.\n/// \n/// **Parameters:**\n/// \n/// - `group_id: i64`: Unique identifier for the group within Rippling. (required)\nasync fn example_groups_put_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Group = client\n .groups()\n .put_id(\n 4 as i64,\n &rippling_api::types::GroupUpdatePayload {\n name: Some(\"some-string\".to_string()),\n spoke_id: Some(\"some-string\".to_string()),\n users: Some(vec![serde_json::Value::String(\"some-string\".to_string())]),\n version: Some(\"some-string\".to_string()),\n },\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/groups/struct.Groups.html#method.put_id" } }, { "op": "add", "path": "/paths/~1platform~1api~1leave_balances/get/x-rust", "value": { - "example": "/// GET Leave Balances\n/// \n/// Retrieves the leave balances for employees\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offset the returned values\nasync fn example_j_leaves_get_leave_balances() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::GetLeaveBalancesResponse = client\n .j_leaves()\n .get_leave_balances(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/j_leaves/struct.JLeaves.html#method.get_leave_balances" + "example": "/// GET Leave Balances\n/// \n/// Retrieves the leave balances for employees\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offset the returned values\nasync fn example_leaves_get_balances() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::GetLeaveBalancesResponse = client\n .leaves()\n .get_balances(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/leaves/struct.Leaves.html#method.get_balances" } }, { "op": "add", "path": "/paths/~1platform~1api~1leave_balances~1{role}/get/x-rust", "value": { - "example": "/// GET Leave Balance\n/// \n/// Retrieves the leave balances for a given role. A role represents 1 employee. An employee can work at 1 and only 1 company.\n/// \n/// **Parameters:**\n/// \n/// - `role: &'astr`: This is the unique role ID of the employee. It corresponds to the IDs returned in the Get/employees endpoint (required)\nasync fn example_j_leaves_get_leave_balance() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::GetLeaveBalanceResponse =\n client.j_leaves().get_leave_balance(\"some-string\").await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/j_leaves/struct.JLeaves.html#method.get_leave_balance" + "example": "/// GET Leave Balance\n/// \n/// Retrieves the leave balances for a given role. A role represents 1 employee. An employee can work at 1 and only 1 company.\n/// \n/// **Parameters:**\n/// \n/// - `role: &'astr`: This is the unique role ID of the employee. It corresponds to the IDs returned in the Get/employees endpoint (required)\nasync fn example_leaves_get_balance() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::GetLeaveBalanceResponse =\n client.leaves().get_balance(\"some-string\").await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/leaves/struct.Leaves.html#method.get_balance" } }, { "op": "add", "path": "/paths/~1platform~1api~1leave_requests/get/x-rust", "value": { - "example": "/// GET Leave Requests\n/// \n/// Retrieves the current leave requests.The query can be filtered by a number of specific query parameters.\n/// \n/// **Parameters:**\n/// \n/// - `end_date: Option`: End date of leave.\n/// - `from: Option`: Filter to capture whether the leave request overlaps with a date range.\n/// - `id: Option`\n/// - `leave_policy: Option`\n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\n/// - `processed_by: Option`\n/// - `requested_by: Option`\n/// - `role: Option`\n/// - `start_date: Option`: Start date of leave.\n/// - `status: Option`\n/// - `to: Option`: Filter to capture whether the leave request overlaps with a date range.\nasync fn example_j_leaves_get_leave_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .j_leaves()\n .get_leave_requests(\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/j_leaves/struct.JLeaves.html#method.get_leave_requests" + "example": "/// GET Leave Requests\n/// \n/// Retrieves the current leave requests.The query can be filtered by a number of specific query parameters.\n/// \n/// **Parameters:**\n/// \n/// - `end_date: Option`: End date of leave.\n/// - `from: Option`: Filter to capture whether the leave request overlaps with a date range.\n/// - `id: Option`\n/// - `leave_policy: Option`\n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\n/// - `processed_by: Option`\n/// - `requested_by: Option`\n/// - `role: Option`\n/// - `start_date: Option`: Start date of leave.\n/// - `status: Option`\n/// - `to: Option`: Filter to capture whether the leave request overlaps with a date range.\nasync fn example_leaves_get_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .leaves()\n .get_requests(\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/leaves/struct.Leaves.html#method.get_requests" } }, { "op": "add", "path": "/paths/~1platform~1api~1leave_requests/post/x-rust", "value": { - "example": "/// POST Leave Request\n/// \n/// Create a leave request. This endpoint is currently in alpha and should not be used by default. Only TILT managed requests can have a status other than PENDING.\nasync fn example_j_leaves_post_leave_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::LeaveRequest = client\n .j_leaves()\n .post_leave_requests(&rippling_api::types::PostLeaveRequestsRequestBody {\n role: \"some-string\".to_string(),\n requested_by: Some(\"some-string\".to_string()),\n status: Some(\"some-string\".to_string()),\n start_date: \"some-string\".to_string(),\n end_date: \"some-string\".to_string(),\n start_date_start_time: Some(\"some-string\".to_string()),\n end_date_end_time: Some(\"some-string\".to_string()),\n start_date_custom_hours: Some(\"some-string\".to_string()),\n end_date_custom_hours: Some(\"some-string\".to_string()),\n company_leave_type: \"some-string\".to_string(),\n leave_policy: \"some-string\".to_string(),\n reason_for_leave: Some(\"some-string\".to_string()),\n managed_by: Some(\"some-string\".to_string()),\n external_id: Some(\"some-string\".to_string()),\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/j_leaves/struct.JLeaves.html#method.post_leave_requests" + "example": "/// POST Leave Request\n/// \n/// Create a leave request. This endpoint is currently in alpha and should not be used by default. Only TILT managed requests can have a status other than PENDING.\nasync fn example_leaves_post_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::LeaveRequest = client\n .leaves()\n .post_requests(&rippling_api::types::PostLeaveRequestsRequestBody {\n role: \"some-string\".to_string(),\n requested_by: Some(\"some-string\".to_string()),\n status: Some(\"some-string\".to_string()),\n start_date: \"some-string\".to_string(),\n end_date: \"some-string\".to_string(),\n start_date_start_time: Some(\"some-string\".to_string()),\n end_date_end_time: Some(\"some-string\".to_string()),\n start_date_custom_hours: Some(\"some-string\".to_string()),\n end_date_custom_hours: Some(\"some-string\".to_string()),\n company_leave_type: \"some-string\".to_string(),\n leave_policy: \"some-string\".to_string(),\n reason_for_leave: Some(\"some-string\".to_string()),\n managed_by: Some(\"some-string\".to_string()),\n external_id: Some(\"some-string\".to_string()),\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/leaves/struct.Leaves.html#method.post_requests" } }, { "op": "add", "path": "/paths/~1platform~1api~1leave_requests~1{id}/patch/x-rust", "value": { - "example": "/// PATCH Leave Request\n/// \n/// Update an existing leave request. With the exception of TILT-managed leave requests, updates are restricted based on status; APPROVED requests can not be updated with different dates, and the status itself can not be updated. Use the process endpoint to update the status of a PENDING request. For other updates, use the cancel endpoint to cancel the request, and create a new request with the updated information.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: Unique identifier of the leave request being modified (required)\nasync fn example_j_leaves_patch_leave_requests_leave_request_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .j_leaves()\n .patch_leave_requests_leave_request_id(\n \"some-string\",\n &rippling_api::types::PatchLeaveRequestsLeaveRequestIdRequestBody {\n requested_by: Some(\"some-string\".to_string()),\n status: Some(\"some-string\".to_string()),\n start_date: Some(\"some-string\".to_string()),\n end_date: Some(\"some-string\".to_string()),\n start_date_start_time: Some(\"some-string\".to_string()),\n end_date_end_time: Some(\"some-string\".to_string()),\n start_date_custom_hours: Some(\"some-string\".to_string()),\n end_date_custom_hours: Some(\"some-string\".to_string()),\n reason_for_leave: Some(\"some-string\".to_string()),\n },\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/j_leaves/struct.JLeaves.html#method.patch_leave_requests_leave_request_id" + "example": "/// PATCH Leave Request\n/// \n/// Update an existing leave request. With the exception of TILT-managed leave requests, updates are restricted based on status; APPROVED requests can not be updated with different dates, and the status itself can not be updated. Use the process endpoint to update the status of a PENDING request. For other updates, use the cancel endpoint to cancel the request, and create a new request with the updated information.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: Unique identifier of the leave request being modified (required)\nasync fn example_leaves_patch_requests_request_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .leaves()\n .patch_requests_request_id(\n \"some-string\",\n &rippling_api::types::PatchLeaveRequestsLeaveRequestIdRequestBody {\n requested_by: Some(\"some-string\".to_string()),\n status: Some(\"some-string\".to_string()),\n start_date: Some(\"some-string\".to_string()),\n end_date: Some(\"some-string\".to_string()),\n start_date_start_time: Some(\"some-string\".to_string()),\n end_date_end_time: Some(\"some-string\".to_string()),\n start_date_custom_hours: Some(\"some-string\".to_string()),\n end_date_custom_hours: Some(\"some-string\".to_string()),\n reason_for_leave: Some(\"some-string\".to_string()),\n },\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/leaves/struct.Leaves.html#method.patch_requests_request_id" } }, { "op": "add", "path": "/paths/~1platform~1api~1leave_requests~1{id}~1cancel/post/x-rust", "value": { - "example": "/// POST Cancel Leave Request\n/// \n/// Cancel a leave request.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: Unique identifier of the leave request being canceled. (required)\nasync fn example_j_leaves_cancel_leave_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::LeaveRequest = client\n .j_leaves()\n .cancel_leave_requests(\"some-string\")\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/j_leaves/struct.JLeaves.html#method.cancel_leave_requests" + "example": "/// POST Cancel Leave Request\n/// \n/// Cancel a leave request.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: Unique identifier of the leave request being canceled. (required)\nasync fn example_leaves_cancel_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::LeaveRequest = client.leaves().cancel_requests(\"some-string\").await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/leaves/struct.Leaves.html#method.cancel_requests" } }, { "op": "add", "path": "/paths/~1platform~1api~1leave_requests~1{id}~1process/post/x-rust", "value": { - "example": "/// POST Process Leave Request\n/// \n/// Approve or decline a leave request. Only pending requests can be processed (approved / declined). Only an admin or manager is capable of taking action on a request.\n/// \n/// **Parameters:**\n/// \n/// - `action: crate::types::Action`: The action to be taken on the leave request. Can be either approved or declined. (required)\n/// - `id: &'astr`: Unique identifier of the leave request being processed. (required)\nasync fn example_j_leaves_process_leave_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::LeaveRequest = client\n .j_leaves()\n .process_leave_requests(rippling_api::types::Action::Decline, \"some-string\")\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/j_leaves/struct.JLeaves.html#method.process_leave_requests" + "example": "/// POST Process Leave Request\n/// \n/// Approve or decline a leave request. Only pending requests can be processed (approved / declined). Only an admin or manager is capable of taking action on a request.\n/// \n/// **Parameters:**\n/// \n/// - `action: crate::types::Action`: The action to be taken on the leave request. Can be either approved or declined. (required)\n/// - `id: &'astr`: Unique identifier of the leave request being processed. (required)\nasync fn example_leaves_process_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::LeaveRequest = client\n .leaves()\n .process_requests(rippling_api::types::Action::Decline, \"some-string\")\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/leaves/struct.Leaves.html#method.process_requests" } }, { "op": "add", "path": "/paths/~1platform~1api~1levels/get/x-rust", "value": { - "example": "/// GET Levels\n/// \n/// Retrieves the levels for the company. Levels are set positions for an organization, such as Manager, or Executive.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\nasync fn example_a_companies_get_levels() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .a_companies()\n .get_levels(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/a_companies/struct.ACompanies.html#method.get_levels" + "example": "/// GET Levels\n/// \n/// Retrieves the levels for the company. Levels are set positions for an organization, such as Manager, or Executive.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\nasync fn example_companies_get_levels() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .companies()\n .get_levels(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/companies/struct.Companies.html#method.get_levels" } }, { "op": "add", "path": "/paths/~1platform~1api~1mark_app_installed/post/x-rust", "value": { - "example": "/// Mark App Installed\n/// \n/// This endpoint can be hit to mark your app as installed in Rippling, if you aren't hitting Rippling's other endpoints on installation. The endpoint does not require any scopes.\n/// \n/// Please note, hitting any other endpoint should mark your app as installed as well.\nasync fn example_i_application_management_post_mark_app_installed() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::PostMarkAppInstalledResponse = client\n .i_application_management()\n .post_mark_app_installed()\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/i_application_management/struct.IApplicationManagement.html#method.post_mark_app_installed" + "example": "/// Mark App Installed\n/// \n/// This endpoint can be hit to mark your app as installed in Rippling, if you aren't hitting Rippling's other endpoints on installation. The endpoint does not require any scopes.\n/// \n/// Please note, hitting any other endpoint should mark your app as installed as well.\nasync fn example_application_management_post_mark_app_installed() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::PostMarkAppInstalledResponse = client\n .application_management()\n .post_mark_app_installed()\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/application_management/struct.ApplicationManagement.html#method.post_mark_app_installed" } }, { "op": "add", "path": "/paths/~1platform~1api~1me/get/x-rust", "value": { - "example": "/// GET Current User\n/// \n/// Retrieves basic information about the Rippling user whose access token you're using. This is generally used for the SSO flow.\nasync fn example_e_current_user_get_me() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::AuthenticatedUserMe = client.e_current_user().get_me().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/e_current_user/struct.ECurrentUser.html#method.get_me" + "example": "/// GCurrent User\n/// \n/// Retrieves basic information about the Rippling user whose access token you're using. This is generally used for the SSO flow.\nasync fn example_current_user_get_me() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::AuthenticatedUserMe = client.current_user().get_me().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/current_user/struct.CurrentUser.html#method.get_me" } }, { "op": "add", "path": "/paths/~1platform~1api~1saml~1idp_metadata/get/x-rust", "value": { - "example": "/// GET SAML Metadata\n/// \n/// Returns a SAML IDP metadata file for the current app integration. Note that this endpoint is only accessible using a token associated with an app integration that has SAML enabled; otherwise it returns a 404 error.\n/// \n/// Rippling's SAML Metadata is per customer app installation. It is not the same across all customers. It is not the same if the customer uninstalls and reinstalls your app. Any time a new app is installed, unique SAML Metadata will be generated specific to that app.\nasync fn example_g_saml_get_saml_idp_metadata() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: String = client.g_saml().get_saml_idp_metadata().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/g_saml/struct.GSaml.html#method.get_saml_idp_metadata" + "example": "/// GET SAML Metadata\n/// \n/// Returns a SAML IDP metadata file for the current app integration. Note that this endpoint is only accessible using a token associated with an app integration that has SAML enabled; otherwise it returns a 404 error.\n/// \n/// Rippling's SAML Metadata is per customer app installation. It is not the same across all customers. It is not the same if the customer uninstalls and reinstalls your app. Any time a new app is installed, unique SAML Metadata will be generated specific to that app.\nasync fn example_saml_get_idp_metadata() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: String = client.saml().get_idp_metadata().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/saml/struct.Saml.html#method.get_idp_metadata" } }, { "op": "add", "path": "/paths/~1platform~1api~1teams/get/x-rust", "value": { - "example": "/// GET Teams\n/// \n/// Retrieves the list of teams for the company.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\nasync fn example_a_companies_get_teams() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .a_companies()\n .get_teams(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/a_companies/struct.ACompanies.html#method.get_teams" + "example": "/// GET Teams\n/// \n/// Retrieves the list of teams for the company.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\nasync fn example_companies_get_teams() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .companies()\n .get_teams(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/companies/struct.Companies.html#method.get_teams" } }, { "op": "add", "path": "/paths/~1platform~1api~1work_locations/get/x-rust", "value": { - "example": "/// GET Work Locations\n/// \n/// Returns the list of work locations for a given company.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\nasync fn example_a_companies_get_work_locations() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .a_companies()\n .get_work_locations(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/a_companies/struct.ACompanies.html#method.get_work_locations" + "example": "/// GET Work Locations\n/// \n/// Returns the list of work locations for a given company.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Sets a limit on the returned values\n/// - `offset: Option`: Offsets the returned values\nasync fn example_companies_get_work_locations() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .companies()\n .get_work_locations(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "libDocsLink": "https://docs.rs/rippling-api/latest/rippling-api/companies/struct.Companies.html#method.get_work_locations" } } ] \ No newline at end of file diff --git a/rippling/src/i_application_management.rs b/rippling/src/application_management.rs similarity index 65% rename from rippling/src/i_application_management.rs rename to rippling/src/application_management.rs index e9dc7fc..05795d8 100644 --- a/rippling/src/i_application_management.rs +++ b/rippling/src/application_management.rs @@ -2,27 +2,17 @@ use anyhow::Result; use crate::Client; #[derive(Clone, Debug)] -pub struct IApplicationManagement { +pub struct ApplicationManagement { pub client: Client, } -impl IApplicationManagement { +impl ApplicationManagement { #[doc(hidden)] pub fn new(client: Client) -> Self { Self { client } } - #[doc = "GET Matching App Users\n\nReturns matching users and their app IDs based on the app \ - handles.\n\nNote:There could be multiple instances of the same app. In this case, the \ - API will return all instances in the format \ - app_handle_app_owner_id.\n\n\n**Parameters:**\n\n- `app_handles: Option`: CSV \ - of app handles. See GET /app_detail/app_handles\n\n\n```rust,no_run\nasync fn \ - example_i_application_management_get_app_app_matching_users() -> anyhow::Result<()> \ - {\n let client = rippling_api::Client::new_from_env();\n let result: \ - rippling_api::types::GetAppAppMatchingUsersResponse = client\n \ - .i_application_management()\n \ - .get_app_app_matching_users(Some(\"some-string\".to_string()))\n .await?;\n \ - println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "GET Matching App Users\n\nReturns matching users and their app IDs based on the app handles.\n\nNote:There could be multiple instances of the same app. In this case, the API will return all instances in the format app_handle_app_owner_id.\n\n\n**Parameters:**\n\n- `app_handles: Option`: CSV of app handles. See GET /app_detail/app_handles\n\n\n```rust,no_run\nasync fn example_application_management_get_app_app_matching_users() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::GetAppAppMatchingUsersResponse = client\n .application_management()\n .get_app_app_matching_users(Some(\"some-string\".to_string()))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_app_app_matching_users<'a>( &'a self, @@ -61,7 +51,15 @@ impl IApplicationManagement { } } - #[doc = "Mark App Installed\n\nThis endpoint can be hit to mark your app as installed in Rippling, if you aren't hitting Rippling's other endpoints on installation. The endpoint does not require any scopes.\n\nPlease note, hitting any other endpoint should mark your app as installed as well.\n\n```rust,no_run\nasync fn example_i_application_management_post_mark_app_installed() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::PostMarkAppInstalledResponse = client\n .i_application_management()\n .post_mark_app_installed()\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Mark App Installed\n\nThis endpoint can be hit to mark your app as installed in \ + Rippling, if you aren't hitting Rippling's other endpoints on installation. The \ + endpoint does not require any scopes.\n\nPlease note, hitting any other endpoint \ + should mark your app as installed as well.\n\n```rust,no_run\nasync fn \ + example_application_management_post_mark_app_installed() -> anyhow::Result<()> {\n \ + let client = rippling_api::Client::new_from_env();\n let result: \ + rippling_api::types::PostMarkAppInstalledResponse = client\n \ + .application_management()\n .post_mark_app_installed()\n .await?;\n \ + println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn post_mark_app_installed<'a>( &'a self, diff --git a/rippling/src/h_ats.rs b/rippling/src/ats.rs similarity index 51% rename from rippling/src/h_ats.rs rename to rippling/src/ats.rs index 2e8e34f..798d4bc 100644 --- a/rippling/src/h_ats.rs +++ b/rippling/src/ats.rs @@ -2,19 +2,19 @@ use anyhow::Result; use crate::Client; #[derive(Clone, Debug)] -pub struct HAts { +pub struct Ats { pub client: Client, } -impl HAts { +impl Ats { #[doc(hidden)] pub fn new(client: Client) -> Self { Self { client } } - #[doc = "POST New Candidate\n\nPushes a candidate from an applicant tracking system directly into the Rippling onboarding flow. Please note, this endpoint is only available to applications integrating with OAuth2.0.\n\nNOTE: This endpoint is NOT available for use with Rippling customer API Keys.\n\n```rust,no_run\nasync fn example_h_ats_post_ats_candidates_push_candidate() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Candidate = client\n .h_ats()\n .post_ats_candidates_push_candidate(&rippling_api::types::Candidate {\n name: Some(\"some-string\".to_string()),\n email: Some(\"some-string\".to_string()),\n job_title: Some(\"some-string\".to_string()),\n phone_number: Some(\"some-string\".to_string()),\n candidate_id: Some(\"some-string\".to_string()),\n start_date: Some(chrono::Utc::now().date_naive()),\n salary_unit: Some(rippling_api::types::SalaryUnit::PayPeriod),\n salary_per_unit: Some(3.14 as f64),\n signing_bonus: Some(3.14 as f64),\n currency: Some(\"some-string\".to_string()),\n equity_shares: Some(4 as i64),\n department: Some(\"some-string\".to_string()),\n employment_type: Some(rippling_api::types::CandidateEmploymentType::Temp),\n work_location: Some(\"some-string\".to_string()),\n attachments: Some(vec![rippling_api::types::Attachments {\n file_name: Some(\"some-string\".to_string()),\n file_url: Some(\"some-string\".to_string()),\n }]),\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "POST New Candidate\n\nPushes a candidate from an applicant tracking system directly into the Rippling onboarding flow. Please note, this endpoint is only available to applications integrating with OAuth2.0.\n\nNOTE: This endpoint is NOT available for use with Rippling customer API Keys.\n\n```rust,no_run\nasync fn example_ats_post_candidates_push_candidate() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Candidate = client\n .ats()\n .post_candidates_push_candidate(&rippling_api::types::Candidate {\n name: Some(\"some-string\".to_string()),\n email: Some(\"some-string\".to_string()),\n job_title: Some(\"some-string\".to_string()),\n phone_number: Some(\"some-string\".to_string()),\n candidate_id: Some(\"some-string\".to_string()),\n start_date: Some(chrono::Utc::now().date_naive()),\n salary_unit: Some(rippling_api::types::SalaryUnit::PayPeriod),\n salary_per_unit: Some(3.14 as f64),\n signing_bonus: Some(3.14 as f64),\n currency: Some(\"some-string\".to_string()),\n equity_shares: Some(4 as i64),\n department: Some(\"some-string\".to_string()),\n employment_type: Some(rippling_api::types::CandidateEmploymentType::Temp),\n work_location: Some(\"some-string\".to_string()),\n attachments: Some(vec![rippling_api::types::Attachments {\n file_name: Some(\"some-string\".to_string()),\n file_url: Some(\"some-string\".to_string()),\n }]),\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn post_ats_candidates_push_candidate<'a>( + pub async fn post_candidates_push_candidate<'a>( &'a self, body: &crate::types::Candidate, ) -> Result { diff --git a/rippling/src/a_companies.rs b/rippling/src/companies.rs similarity index 86% rename from rippling/src/a_companies.rs rename to rippling/src/companies.rs index ac2f7b7..4fc0dc8 100644 --- a/rippling/src/a_companies.rs +++ b/rippling/src/companies.rs @@ -2,11 +2,11 @@ use anyhow::Result; use crate::Client; #[derive(Clone, Debug)] -pub struct ACompanies { +pub struct Companies { pub client: Client, } -impl ACompanies { +impl Companies { #[doc(hidden)] pub fn new(client: Client) -> Self { Self { client } @@ -14,15 +14,12 @@ impl ACompanies { #[doc = "GET Current Company\n\nReturns the currently accessible company for the given token. \ Please note, the returned fields depend on the scopes that are enabled for your \ - access token or API key.\n\n```rust,no_run\nasync fn \ - example_a_companies_get_companies() -> anyhow::Result<()> {\n let client = \ - rippling_api::Client::new_from_env();\n let result: rippling_api::types::Company = \ - client.a_companies().get_companies().await?;\n println!(\"{:?}\", result);\n \ - Ok(())\n}\n```"] + access token or API key.\n\n```rust,no_run\nasync fn example_companies_get() -> \ + anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let \ + result: rippling_api::types::Company = client.companies().get().await?;\n \ + println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn get_companies<'a>( - &'a self, - ) -> Result { + pub async fn get<'a>(&'a self) -> Result { let mut req = self.client.client.request( http::Method::GET, &format!( @@ -50,7 +47,14 @@ impl ACompanies { } } - #[doc = "GET Departments\n\nReturns a list of departments for the given company.\n\n**Parameters:**\n\n- `limit: Option`: Sets a limit on the returned values\n- `offset: Option`: Offsets the returned values\n\n```rust,no_run\nasync fn example_a_companies_get_departments() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec> = client\n .a_companies()\n .get_departments(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "GET Departments\n\nReturns a list of departments for the given \ + company.\n\n**Parameters:**\n\n- `limit: Option`: Sets a limit on the returned \ + values\n- `offset: Option`: Offsets the returned values\n\n```rust,no_run\nasync \ + fn example_companies_get_departments() -> anyhow::Result<()> {\n let client = \ + rippling_api::Client::new_from_env();\n let result: \ + Vec> = client\n .companies()\n \ + .get_departments(Some(4 as i64), Some(4 as i64))\n .await?;\n \ + println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_departments<'a>( &'a self, @@ -94,9 +98,9 @@ impl ACompanies { #[doc = "GET Work Locations\n\nReturns the list of work locations for a given \ company.\n\n**Parameters:**\n\n- `limit: Option`: Sets a limit on the returned \ values\n- `offset: Option`: Offsets the returned values\n\n```rust,no_run\nasync \ - fn example_a_companies_get_work_locations() -> anyhow::Result<()> {\n let client = \ + fn example_companies_get_work_locations() -> anyhow::Result<()> {\n let client = \ rippling_api::Client::new_from_env();\n let result: \ - Vec = client\n .a_companies()\n \ + Vec = client\n .companies()\n \ .get_work_locations(Some(4 as i64), Some(4 as i64))\n .await?;\n \ println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] @@ -142,9 +146,9 @@ impl ACompanies { #[doc = "GET Custom Fields\n\nReturns the custom fields for the given \ company.\n\n**Parameters:**\n\n- `limit: Option`: Sets a limit on the returned \ values\n- `offset: Option`: Offsets the returned values\n\n```rust,no_run\nasync \ - fn example_a_companies_get_custom_fields() -> anyhow::Result<()> {\n let client = \ + fn example_companies_get_custom_fields() -> anyhow::Result<()> {\n let client = \ rippling_api::Client::new_from_env();\n let result: \ - Vec = client\n .a_companies()\n \ + Vec = client\n .companies()\n \ .get_custom_fields(Some(4 as i64), Some(4 as i64))\n .await?;\n \ println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] @@ -189,11 +193,11 @@ impl ACompanies { #[doc = "GET Teams\n\nRetrieves the list of teams for the company.\n\n**Parameters:**\n\n- \ `limit: Option`: Sets a limit on the returned values\n- `offset: Option`: \ - Offsets the returned values\n\n```rust,no_run\nasync fn \ - example_a_companies_get_teams() -> anyhow::Result<()> {\n let client = \ - rippling_api::Client::new_from_env();\n let result: Vec \ - = client\n .a_companies()\n .get_teams(Some(4 as i64), Some(4 as \ - i64))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + Offsets the returned values\n\n```rust,no_run\nasync fn example_companies_get_teams() \ + -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n \ + let result: Vec = client\n .companies()\n \ + .get_teams(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", \ + result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_teams<'a>( &'a self, @@ -237,9 +241,9 @@ impl ACompanies { #[doc = "GET Levels\n\nRetrieves the levels for the company. Levels are set positions for an \ organization, such as Manager, or Executive.\n\n**Parameters:**\n\n- `limit: \ Option`: Sets a limit on the returned values\n- `offset: Option`: Offsets \ - the returned values\n\n```rust,no_run\nasync fn example_a_companies_get_levels() -> \ + the returned values\n\n```rust,no_run\nasync fn example_companies_get_levels() -> \ anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let \ - result: Vec = client\n .a_companies()\n \ + result: Vec = client\n .companies()\n \ .get_levels(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", \ result);\n Ok(())\n}\n```"] #[tracing::instrument] @@ -285,9 +289,9 @@ impl ACompanies { #[doc = "GET Company Leave Types\n\nRetrieves the current company leave types. The query can \ be filtered by managedBy field.\n\n**Parameters:**\n\n- `managed_by: \ Option`\n\n```rust,no_run\nasync fn \ - example_a_companies_get_company_leave_types() -> anyhow::Result<()> {\n let client \ - = rippling_api::Client::new_from_env();\n let result: \ - Vec = client\n .a_companies()\n \ + example_companies_get_company_leave_types() -> anyhow::Result<()> {\n let client = \ + rippling_api::Client::new_from_env();\n let result: \ + Vec = client\n .companies()\n \ .get_company_leave_types(Some(\"some-string\".to_string()))\n .await?;\n \ println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] @@ -328,7 +332,7 @@ impl ACompanies { } } - #[doc = "GET Company Activity\n\nRetrieves the activity for a given company.\n\nThe most reliable method to ingest all activity from Rippling is to use a pagination cursor via the 'next' parameter. This will ensure that events are not skipped or duplicated due to the lack of timestamp precision.\n\nThe general sequence of steps to leverage the next parameter:\n\n1. Issue an initial request using startDate with a value set to some date in the last 90 days\n2. Retrieve the next page of events through the next value from the response data.\n3. Issue the paginated request\n4. Retrieve the next page of events through the next value from the response data\n5. Pause and repeat the previous step\n\n\n**Parameters:**\n\n- `end_date: Option`: Timestamp to list activity before (inclusive).\n- `limit: Option`: Specifies the number of results to page (maximum: 1000) (default: 1000)\n- `next: Option`: Specifies the pagination cursor to the next page\n- `start_date: Option`: Timestamp to list activity after (inclusive). This should be less than 90 days from now. Defaults to 90 days.\n\n```rust,no_run\nasync fn example_a_companies_get_company_activity() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::GetCompanyActivityResponse = client\n .a_companies()\n .get_company_activity(\n Some(chrono::Utc::now().date_naive()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(chrono::Utc::now().date_naive()),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "GET Company Activity\n\nRetrieves the activity for a given company.\n\nThe most reliable method to ingest all activity from Rippling is to use a pagination cursor via the 'next' parameter. This will ensure that events are not skipped or duplicated due to the lack of timestamp precision.\n\nThe general sequence of steps to leverage the next parameter:\n\n1. Issue an initial request using startDate with a value set to some date in the last 90 days\n2. Retrieve the next page of events through the next value from the response data.\n3. Issue the paginated request\n4. Retrieve the next page of events through the next value from the response data\n5. Pause and repeat the previous step\n\n\n**Parameters:**\n\n- `end_date: Option`: Timestamp to list activity before (inclusive).\n- `limit: Option`: Specifies the number of results to page (maximum: 1000) (default: 1000)\n- `next: Option`: Specifies the pagination cursor to the next page\n- `start_date: Option`: Timestamp to list activity after (inclusive). This should be less than 90 days from now. Defaults to 90 days.\n\n```rust,no_run\nasync fn example_companies_get_company_activity() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::GetCompanyActivityResponse = client\n .companies()\n .get_company_activity(\n Some(chrono::Utc::now().date_naive()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(chrono::Utc::now().date_naive()),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_company_activity<'a>( &'a self, diff --git a/rippling/src/e_current_user.rs b/rippling/src/current_user.rs similarity index 70% rename from rippling/src/e_current_user.rs rename to rippling/src/current_user.rs index e550969..91b1f94 100644 --- a/rippling/src/e_current_user.rs +++ b/rippling/src/current_user.rs @@ -2,17 +2,17 @@ use anyhow::Result; use crate::Client; #[derive(Clone, Debug)] -pub struct ECurrentUser { +pub struct CurrentUser { pub client: Client, } -impl ECurrentUser { +impl CurrentUser { #[doc(hidden)] pub fn new(client: Client) -> Self { Self { client } } - #[doc = "GET Current User\n\nRetrieves basic information about the Rippling user whose access token you're using. This is generally used for the SSO flow.\n\n```rust,no_run\nasync fn example_e_current_user_get_me() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::AuthenticatedUserMe = client.e_current_user().get_me().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "GCurrent User\n\nRetrieves basic information about the Rippling user whose access token you're using. This is generally used for the SSO flow.\n\n```rust,no_run\nasync fn example_current_user_get_me() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::AuthenticatedUserMe = client.current_user().get_me().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_me<'a>( &'a self, diff --git a/rippling/src/b_employees.rs b/rippling/src/employees.rs similarity index 80% rename from rippling/src/b_employees.rs rename to rippling/src/employees.rs index 79615e1..c7be3e5 100644 --- a/rippling/src/b_employees.rs +++ b/rippling/src/employees.rs @@ -2,11 +2,11 @@ use anyhow::Result; use crate::Client; #[derive(Clone, Debug)] -pub struct BEmployees { +pub struct Employees { pub client: Client, } -impl BEmployees { +impl Employees { #[doc(hidden)] pub fn new(client: Client) -> Self { Self { client } @@ -19,13 +19,13 @@ impl BEmployees { via our limit and offset parameters. Pagination should be set to a maximum of \ 100.\n\n**Parameters:**\n\n- `limit: Option`: Sets a limit on the returned \ values\n- `offset: Option`: Offsets the returned values\n\n```rust,no_run\nasync \ - fn example_b_employees_get_employees() -> anyhow::Result<()> {\n let client = \ + fn example_employees_get() -> anyhow::Result<()> {\n let client = \ rippling_api::Client::new_from_env();\n let result: \ - Vec = client\n .b_employees()\n \ - .get_employees(Some(4 as i64), Some(4 as i64))\n .await?;\n \ - println!(\"{:?}\", result);\n Ok(())\n}\n```"] + Vec = client\n .employees()\n \ + .get(Some(4 as i64), Some(4 as i64))\n .await?;\n println!(\"{:?}\", \ + result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn get_employees<'a>( + pub async fn get<'a>( &'a self, limit: Option, offset: Option, @@ -64,17 +64,9 @@ impl BEmployees { } } - #[doc = "GET Employee\n\nRetrieves the information for a single employee based on the scopes \ - that your API key or access token have access to.\n\n**Parameters:**\n\n- \ - `employee_id: &'astr`: Unique identifier for the employee within Rippling. \ - (required)\n\n```rust,no_run\nasync fn \ - example_b_employees_get_employees_employee_id() -> anyhow::Result<()> {\n let \ - client = rippling_api::Client::new_from_env();\n let result: \ - rippling_api::types::Employee = client\n .b_employees()\n \ - .get_employees_employee_id(\"some-string\")\n .await?;\n println!(\"{:?}\", \ - result);\n Ok(())\n}\n```"] + #[doc = "GET Employee\n\nRetrieves the information for a single employee based on the scopes that your API key or access token have access to.\n\n**Parameters:**\n\n- `employee_id: &'astr`: Unique identifier for the employee within Rippling. (required)\n\n```rust,no_run\nasync fn example_employees_get_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Employee = client.employees().get_id(\"some-string\").await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn get_employees_employee_id<'a>( + pub async fn get_id<'a>( &'a self, employee_id: &'a str, ) -> Result { @@ -117,14 +109,13 @@ impl BEmployees { integrations that rely on provisioning, this parameter can be used to identify non \ provisioned roles for compliance purposes. TRUE will return every employee from the \ company (bypassing any access rules).\n\n```rust,no_run\nasync fn \ - example_b_employees_get_employees_include_terminated() -> anyhow::Result<()> {\n \ - let client = rippling_api::Client::new_from_env();\n let result: \ - Vec = client\n .b_employees()\n \ - .get_employees_include_terminated(\n Some(4 as i64),\n Some(4 \ - as i64),\n Some(4 as i64),\n Some(false),\n )\n \ - .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + example_employees_get_include_terminated() -> anyhow::Result<()> {\n let client = \ + rippling_api::Client::new_from_env();\n let result: \ + Vec = client\n .employees()\n \ + .get_include_terminated(Some(4 as i64), Some(4 as i64), Some(4 as i64), \ + Some(false))\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn get_employees_include_terminated<'a>( + pub async fn get_include_terminated<'a>( &'a self, ein: Option, limit: Option, diff --git a/rippling/src/f_groups.rs b/rippling/src/groups.rs similarity index 75% rename from rippling/src/f_groups.rs rename to rippling/src/groups.rs index c05edb0..f78b507 100644 --- a/rippling/src/f_groups.rs +++ b/rippling/src/groups.rs @@ -2,11 +2,11 @@ use anyhow::Result; use crate::Client; #[derive(Clone, Debug)] -pub struct FGroups { +pub struct Groups { pub client: Client, } -impl FGroups { +impl Groups { #[doc(hidden)] pub fn new(client: Client) -> Self { Self { client } @@ -15,15 +15,12 @@ impl FGroups { #[doc = "GET Groups\n\nPlease note, the Groups endpoint requires an OAuth application (i.e. \ approved 3rd party partners), as the end point is intended for mapping third-party \ application “Groups” within Rippling organizations.\n\nLists the current third-party \ - groups for an organization.\n\n```rust,no_run\nasync fn example_f_groups_get_groups() \ - -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n \ - let result: Vec = \ - client.f_groups().get_groups().await?;\n println!(\"{:?}\", result);\n \ - Ok(())\n}\n```"] + groups for an organization.\n\n```rust,no_run\nasync fn example_groups_get() -> \ + anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let \ + result: Vec = client.groups().get().await?;\n \ + println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn get_groups<'a>( - &'a self, - ) -> Result, crate::types::error::Error> { + pub async fn get<'a>(&'a self) -> Result, crate::types::error::Error> { let mut req = self.client.client.request( http::Method::GET, &format!("{}/{}", self.client.base_url, "platform/api/groups"), @@ -49,16 +46,16 @@ impl FGroups { } #[doc = "POST Groups\n\nCreates a generic group, that can be associated within the third-party \ - application.\n\n```rust,no_run\nasync fn example_f_groups_post_groups() -> \ - anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let \ - result: rippling_api::types::Group = client\n .f_groups()\n \ - .post_groups(&rippling_api::types::PostGroupsRequestBody {\n name: \ + application.\n\n```rust,no_run\nasync fn example_groups_post() -> anyhow::Result<()> \ + {\n let client = rippling_api::Client::new_from_env();\n let result: \ + rippling_api::types::Group = client\n .groups()\n \ + .post(&rippling_api::types::PostGroupsRequestBody {\n name: \ Some(\"some-string\".to_string()),\n spoke_id: \ Some(\"some-string\".to_string()),\n users: \ Some(vec![\"some-string\".to_string()]),\n })\n .await?;\n \ println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn post_groups<'a>( + pub async fn post<'a>( &'a self, body: &crate::types::PostGroupsRequestBody, ) -> Result { @@ -91,18 +88,17 @@ impl FGroups { approved 3rd party partners), as the end point is intended for mapping third-party \ application “Groups” within Rippling organizations.\n\n**Parameters:**\n\n- \ `group_id: i64`: Unique identifier for the group within Rippling. \ - (required)\n\n```rust,no_run\nasync fn example_f_groups_get_groups_group_id() -> \ - anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let \ - result: rippling_api::types::Group = client\n .f_groups()\n \ - .get_groups_group_id(\n 4 as i64,\n \ - &rippling_api::types::GroupUpdatePayload {\n name: \ - Some(\"some-string\".to_string()),\n spoke_id: \ + (required)\n\n```rust,no_run\nasync fn example_groups_get_id() -> anyhow::Result<()> \ + {\n let client = rippling_api::Client::new_from_env();\n let result: \ + rippling_api::types::Group = client\n .groups()\n .get_id(\n \ + 4 as i64,\n &rippling_api::types::GroupUpdatePayload {\n \ + name: Some(\"some-string\".to_string()),\n spoke_id: \ Some(\"some-string\".to_string()),\n users: \ Some(vec![serde_json::Value::String(\"some-string\".to_string())]),\n \ version: Some(\"some-string\".to_string()),\n },\n )\n \ .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn get_groups_group_id<'a>( + pub async fn get_id<'a>( &'a self, group_id: i64, body: &crate::types::GroupUpdatePayload, @@ -136,9 +132,9 @@ impl FGroups { } } - #[doc = "PUT Group\n\nPlease note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n\nUsing the PUT method, all of the group fields will be updated, even if the corresponding parameter is missing. If the PATCH method is used, and a param is missing, its value won’t be changed.\n\n**Parameters:**\n\n- `group_id: i64`: Unique identifier for the group within Rippling. (required)\n\n```rust,no_run\nasync fn example_f_groups_put_groups_group_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Group = client\n .f_groups()\n .put_groups_group_id(\n 4 as i64,\n &rippling_api::types::GroupUpdatePayload {\n name: Some(\"some-string\".to_string()),\n spoke_id: Some(\"some-string\".to_string()),\n users: Some(vec![serde_json::Value::String(\"some-string\".to_string())]),\n version: Some(\"some-string\".to_string()),\n },\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "PUT Group\n\nPlease note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n\nUsing the PUT method, all of the group fields will be updated, even if the corresponding parameter is missing. If the PATCH method is used, and a param is missing, its value won’t be changed.\n\n**Parameters:**\n\n- `group_id: i64`: Unique identifier for the group within Rippling. (required)\n\n```rust,no_run\nasync fn example_groups_put_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Group = client\n .groups()\n .put_id(\n 4 as i64,\n &rippling_api::types::GroupUpdatePayload {\n name: Some(\"some-string\".to_string()),\n spoke_id: Some(\"some-string\".to_string()),\n users: Some(vec![serde_json::Value::String(\"some-string\".to_string())]),\n version: Some(\"some-string\".to_string()),\n },\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn put_groups_group_id<'a>( + pub async fn put_id<'a>( &'a self, group_id: i64, body: &crate::types::GroupUpdatePayload, @@ -176,15 +172,11 @@ impl FGroups { approved 3rd party partners), as the end point is intended for mapping third-party \ application “Groups” within Rippling organizations.\n\nDeletes the specified \ group.\n\n**Parameters:**\n\n- `group_id: i64`: Unique identifier for the group \ - within Rippling. (required)\n\n```rust,no_run\nasync fn \ - example_f_groups_delete_groups_group_id() -> anyhow::Result<()> {\n let client = \ - rippling_api::Client::new_from_env();\n client.f_groups().delete_groups_group_id(4 \ - as i64).await?;\n Ok(())\n}\n```"] + within Rippling. (required)\n\n```rust,no_run\nasync fn example_groups_delete_id() -> \ + anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n \ + client.groups().delete_id(4 as i64).await?;\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn delete_groups_group_id<'a>( - &'a self, - group_id: i64, - ) -> Result<(), crate::types::error::Error> { + pub async fn delete_id<'a>(&'a self, group_id: i64) -> Result<(), crate::types::error::Error> { let mut req = self.client.client.request( http::Method::DELETE, &format!( @@ -207,9 +199,9 @@ impl FGroups { } } - #[doc = "PATCH Group\n\nPlease note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n\nUsing the PUT method, all of the group fields will be updated, even if the corresponding parameter is missing. If the PATCH method is used, and a param is missing, its value won’t be changed.\n\n**Parameters:**\n\n- `group_id: i64`: Unique identifier for the group within Rippling. (required)\n\n```rust,no_run\nasync fn example_f_groups_patch_groups_group_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Group = client\n .f_groups()\n .patch_groups_group_id(\n 4 as i64,\n &rippling_api::types::GroupUpdatePayload {\n name: Some(\"some-string\".to_string()),\n spoke_id: Some(\"some-string\".to_string()),\n users: Some(vec![serde_json::Value::String(\"some-string\".to_string())]),\n version: Some(\"some-string\".to_string()),\n },\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "PATCH Group\n\nPlease note, the Groups endpoint requires an OAuth application (i.e. approved 3rd party partners), as the end point is intended for mapping third-party application “Groups” within Rippling organizations.\n\nUsing the PUT method, all of the group fields will be updated, even if the corresponding parameter is missing. If the PATCH method is used, and a param is missing, its value won’t be changed.\n\n**Parameters:**\n\n- `group_id: i64`: Unique identifier for the group within Rippling. (required)\n\n```rust,no_run\nasync fn example_groups_patch_id() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::Group = client\n .groups()\n .patch_id(\n 4 as i64,\n &rippling_api::types::GroupUpdatePayload {\n name: Some(\"some-string\".to_string()),\n spoke_id: Some(\"some-string\".to_string()),\n users: Some(vec![serde_json::Value::String(\"some-string\".to_string())]),\n version: Some(\"some-string\".to_string()),\n },\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn patch_groups_group_id<'a>( + pub async fn patch_id<'a>( &'a self, group_id: i64, body: &crate::types::GroupUpdatePayload, diff --git a/rippling/src/j_leaves.rs b/rippling/src/leaves.rs similarity index 80% rename from rippling/src/j_leaves.rs rename to rippling/src/leaves.rs index 2313c75..ed49582 100644 --- a/rippling/src/j_leaves.rs +++ b/rippling/src/leaves.rs @@ -2,19 +2,19 @@ use anyhow::Result; use crate::Client; #[derive(Clone, Debug)] -pub struct JLeaves { +pub struct Leaves { pub client: Client, } -impl JLeaves { +impl Leaves { #[doc(hidden)] pub fn new(client: Client) -> Self { Self { client } } - #[doc = "GET Leave Requests\n\nRetrieves the current leave requests.The query can be filtered by a number of specific query parameters.\n\n**Parameters:**\n\n- `end_date: Option`: End date of leave.\n- `from: Option`: Filter to capture whether the leave request overlaps with a date range.\n- `id: Option`\n- `leave_policy: Option`\n- `limit: Option`: Sets a limit on the returned values\n- `offset: Option`: Offsets the returned values\n- `processed_by: Option`\n- `requested_by: Option`\n- `role: Option`\n- `start_date: Option`: Start date of leave.\n- `status: Option`\n- `to: Option`: Filter to capture whether the leave request overlaps with a date range.\n\n```rust,no_run\nasync fn example_j_leaves_get_leave_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .j_leaves()\n .get_leave_requests(\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "GET Leave Requests\n\nRetrieves the current leave requests.The query can be filtered by a number of specific query parameters.\n\n**Parameters:**\n\n- `end_date: Option`: End date of leave.\n- `from: Option`: Filter to capture whether the leave request overlaps with a date range.\n- `id: Option`\n- `leave_policy: Option`\n- `limit: Option`: Sets a limit on the returned values\n- `offset: Option`: Offsets the returned values\n- `processed_by: Option`\n- `requested_by: Option`\n- `role: Option`\n- `start_date: Option`: Start date of leave.\n- `status: Option`\n- `to: Option`: Filter to capture whether the leave request overlaps with a date range.\n\n```rust,no_run\nasync fn example_leaves_get_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: Vec = client\n .leaves()\n .get_requests(\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n Some(\"some-string\".to_string()),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn get_leave_requests<'a>( + pub async fn get_requests<'a>( &'a self, end_date: Option, from: Option, @@ -103,9 +103,9 @@ impl JLeaves { } } - #[doc = "POST Leave Request\n\nCreate a leave request. This endpoint is currently in alpha and should not be used by default. Only TILT managed requests can have a status other than PENDING.\n\n```rust,no_run\nasync fn example_j_leaves_post_leave_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::LeaveRequest = client\n .j_leaves()\n .post_leave_requests(&rippling_api::types::PostLeaveRequestsRequestBody {\n role: \"some-string\".to_string(),\n requested_by: Some(\"some-string\".to_string()),\n status: Some(\"some-string\".to_string()),\n start_date: \"some-string\".to_string(),\n end_date: \"some-string\".to_string(),\n start_date_start_time: Some(\"some-string\".to_string()),\n end_date_end_time: Some(\"some-string\".to_string()),\n start_date_custom_hours: Some(\"some-string\".to_string()),\n end_date_custom_hours: Some(\"some-string\".to_string()),\n company_leave_type: \"some-string\".to_string(),\n leave_policy: \"some-string\".to_string(),\n reason_for_leave: Some(\"some-string\".to_string()),\n managed_by: Some(\"some-string\".to_string()),\n external_id: Some(\"some-string\".to_string()),\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "POST Leave Request\n\nCreate a leave request. This endpoint is currently in alpha and should not be used by default. Only TILT managed requests can have a status other than PENDING.\n\n```rust,no_run\nasync fn example_leaves_post_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::LeaveRequest = client\n .leaves()\n .post_requests(&rippling_api::types::PostLeaveRequestsRequestBody {\n role: \"some-string\".to_string(),\n requested_by: Some(\"some-string\".to_string()),\n status: Some(\"some-string\".to_string()),\n start_date: \"some-string\".to_string(),\n end_date: \"some-string\".to_string(),\n start_date_start_time: Some(\"some-string\".to_string()),\n end_date_end_time: Some(\"some-string\".to_string()),\n start_date_custom_hours: Some(\"some-string\".to_string()),\n end_date_custom_hours: Some(\"some-string\".to_string()),\n company_leave_type: \"some-string\".to_string(),\n leave_policy: \"some-string\".to_string(),\n reason_for_leave: Some(\"some-string\".to_string()),\n managed_by: Some(\"some-string\".to_string()),\n external_id: Some(\"some-string\".to_string()),\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn post_leave_requests<'a>( + pub async fn post_requests<'a>( &'a self, body: &crate::types::PostLeaveRequestsRequestBody, ) -> Result { @@ -137,13 +137,13 @@ impl JLeaves { #[doc = "GET Leave Balances\n\nRetrieves the leave balances for \ employees\n\n**Parameters:**\n\n- `limit: Option`: Sets a limit on the returned \ values\n- `offset: Option`: Offset the returned values\n\n```rust,no_run\nasync \ - fn example_j_leaves_get_leave_balances() -> anyhow::Result<()> {\n let client = \ + fn example_leaves_get_balances() -> anyhow::Result<()> {\n let client = \ rippling_api::Client::new_from_env();\n let result: \ - rippling_api::types::GetLeaveBalancesResponse = client\n .j_leaves()\n \ - .get_leave_balances(Some(4 as i64), Some(4 as i64))\n .await?;\n \ + rippling_api::types::GetLeaveBalancesResponse = client\n .leaves()\n \ + .get_balances(Some(4 as i64), Some(4 as i64))\n .await?;\n \ println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn get_leave_balances<'a>( + pub async fn get_balances<'a>( &'a self, limit: Option, offset: Option, @@ -186,13 +186,13 @@ impl JLeaves { 1 employee. An employee can work at 1 and only 1 company.\n\n**Parameters:**\n\n- \ `role: &'astr`: This is the unique role ID of the employee. It corresponds to the IDs \ returned in the Get/employees endpoint (required)\n\n```rust,no_run\nasync fn \ - example_j_leaves_get_leave_balance() -> anyhow::Result<()> {\n let client = \ + example_leaves_get_balance() -> anyhow::Result<()> {\n let client = \ rippling_api::Client::new_from_env();\n let result: \ rippling_api::types::GetLeaveBalanceResponse =\n \ - client.j_leaves().get_leave_balance(\"some-string\").await?;\n println!(\"{:?}\", \ + client.leaves().get_balance(\"some-string\").await?;\n println!(\"{:?}\", \ result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn get_leave_balance<'a>( + pub async fn get_balance<'a>( &'a self, role: &'a str, ) -> Result { @@ -226,13 +226,13 @@ impl JLeaves { #[doc = "POST Cancel Leave Request\n\nCancel a leave request.\n\n**Parameters:**\n\n- `id: \ &'astr`: Unique identifier of the leave request being canceled. \ - (required)\n\n```rust,no_run\nasync fn example_j_leaves_cancel_leave_requests() -> \ + (required)\n\n```rust,no_run\nasync fn example_leaves_cancel_requests() -> \ anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let \ - result: rippling_api::types::LeaveRequest = client\n .j_leaves()\n \ - .cancel_leave_requests(\"some-string\")\n .await?;\n println!(\"{:?}\", \ + result: rippling_api::types::LeaveRequest = \ + client.leaves().cancel_requests(\"some-string\").await?;\n println!(\"{:?}\", \ result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn cancel_leave_requests<'a>( + pub async fn cancel_requests<'a>( &'a self, id: &'a str, ) -> Result { @@ -264,9 +264,19 @@ impl JLeaves { } } - #[doc = "POST Process Leave Request\n\nApprove or decline a leave request. Only pending requests can be processed (approved / declined). Only an admin or manager is capable of taking action on a request.\n\n**Parameters:**\n\n- `action: crate::types::Action`: The action to be taken on the leave request. Can be either approved or declined. (required)\n- `id: &'astr`: Unique identifier of the leave request being processed. (required)\n\n```rust,no_run\nasync fn example_j_leaves_process_leave_requests() -> anyhow::Result<()> {\n let client = rippling_api::Client::new_from_env();\n let result: rippling_api::types::LeaveRequest = client\n .j_leaves()\n .process_leave_requests(rippling_api::types::Action::Decline, \"some-string\")\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "POST Process Leave Request\n\nApprove or decline a leave request. Only pending \ + requests can be processed (approved / declined). Only an admin or manager is capable \ + of taking action on a request.\n\n**Parameters:**\n\n- `action: \ + crate::types::Action`: The action to be taken on the leave request. Can be either \ + approved or declined. (required)\n- `id: &'astr`: Unique identifier of the leave \ + request being processed. (required)\n\n```rust,no_run\nasync fn \ + example_leaves_process_requests() -> anyhow::Result<()> {\n let client = \ + rippling_api::Client::new_from_env();\n let result: \ + rippling_api::types::LeaveRequest = client\n .leaves()\n \ + .process_requests(rippling_api::types::Action::Decline, \"some-string\")\n \ + .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn process_leave_requests<'a>( + pub async fn process_requests<'a>( &'a self, action: crate::types::Action, id: &'a str, @@ -308,10 +318,10 @@ impl JLeaves { other updates, use the cancel endpoint to cancel the request, and create a new \ request with the updated information.\n\n**Parameters:**\n\n- `id: &'astr`: Unique \ identifier of the leave request being modified (required)\n\n```rust,no_run\nasync fn \ - example_j_leaves_patch_leave_requests_leave_request_id() -> anyhow::Result<()> {\n \ - let client = rippling_api::Client::new_from_env();\n let result: \ - Vec = client\n .j_leaves()\n \ - .patch_leave_requests_leave_request_id(\n \"some-string\",\n \ + example_leaves_patch_requests_request_id() -> anyhow::Result<()> {\n let client = \ + rippling_api::Client::new_from_env();\n let result: \ + Vec = client\n .leaves()\n \ + .patch_requests_request_id(\n \"some-string\",\n \ &rippling_api::types::PatchLeaveRequestsLeaveRequestIdRequestBody {\n \ requested_by: Some(\"some-string\".to_string()),\n status: \ Some(\"some-string\".to_string()),\n start_date: \ @@ -324,7 +334,7 @@ impl JLeaves { Some(\"some-string\".to_string()),\n },\n )\n .await?;\n \ println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] - pub async fn patch_leave_requests_leave_request_id<'a>( + pub async fn patch_requests_request_id<'a>( &'a self, id: &'a str, body: &crate::types::PatchLeaveRequestsLeaveRequestIdRequestBody, diff --git a/rippling/src/lib.rs b/rippling/src/lib.rs index 45661b7..a41e480 100644 --- a/rippling/src/lib.rs +++ b/rippling/src/lib.rs @@ -75,22 +75,22 @@ #![cfg_attr(docsrs, feature(doc_cfg))] #[cfg(feature = "requests")] -pub mod a_companies; +pub mod application_management; #[cfg(feature = "requests")] -pub mod b_employees; +pub mod ats; #[cfg(feature = "requests")] -pub mod e_current_user; +pub mod companies; #[cfg(feature = "requests")] -pub mod f_groups; +pub mod current_user; #[cfg(feature = "requests")] -pub mod g_saml; +pub mod employees; #[cfg(feature = "requests")] -pub mod h_ats; +pub mod groups; #[cfg(feature = "requests")] -pub mod i_application_management; -#[cfg(feature = "requests")] -pub mod j_leaves; +pub mod leaves; mod methods; +#[cfg(feature = "requests")] +pub mod saml; #[cfg(test)] mod tests; pub mod types; @@ -330,43 +330,43 @@ impl Client { Ok(RequestBuilder(req)) } - /// Return a reference to an interface that provides access to A. Companies operations. - pub fn a_companies(&self) -> a_companies::ACompanies { - a_companies::ACompanies::new(self.clone()) + /// Return a reference to an interface that provides access to Companies operations. + pub fn companies(&self) -> companies::Companies { + companies::Companies::new(self.clone()) } - /// Return a reference to an interface that provides access to B. Employees operations. - pub fn b_employees(&self) -> b_employees::BEmployees { - b_employees::BEmployees::new(self.clone()) + /// Return a reference to an interface that provides access to Employees operations. + pub fn employees(&self) -> employees::Employees { + employees::Employees::new(self.clone()) } - /// Return a reference to an interface that provides access to F. Groups operations. - pub fn f_groups(&self) -> f_groups::FGroups { - f_groups::FGroups::new(self.clone()) + /// Return a reference to an interface that provides access to Groups operations. + pub fn groups(&self) -> groups::Groups { + groups::Groups::new(self.clone()) } - /// Return a reference to an interface that provides access to G. SAML operations. - pub fn g_saml(&self) -> g_saml::GSaml { - g_saml::GSaml::new(self.clone()) + /// Return a reference to an interface that provides access to SAML operations. + pub fn saml(&self) -> saml::Saml { + saml::Saml::new(self.clone()) } - /// Return a reference to an interface that provides access to E. Current User operations. - pub fn e_current_user(&self) -> e_current_user::ECurrentUser { - e_current_user::ECurrentUser::new(self.clone()) + /// Return a reference to an interface that provides access to Current User operations. + pub fn current_user(&self) -> current_user::CurrentUser { + current_user::CurrentUser::new(self.clone()) } - /// Return a reference to an interface that provides access to H. ATS operations. - pub fn h_ats(&self) -> h_ats::HAts { - h_ats::HAts::new(self.clone()) + /// Return a reference to an interface that provides access to ATS operations. + pub fn ats(&self) -> ats::Ats { + ats::Ats::new(self.clone()) } - /// Return a reference to an interface that provides access to I. Application Management operations. - pub fn i_application_management(&self) -> i_application_management::IApplicationManagement { - i_application_management::IApplicationManagement::new(self.clone()) + /// Return a reference to an interface that provides access to Application Management operations. + pub fn application_management(&self) -> application_management::ApplicationManagement { + application_management::ApplicationManagement::new(self.clone()) } - /// Return a reference to an interface that provides access to J. Leaves operations. - pub fn j_leaves(&self) -> j_leaves::JLeaves { - j_leaves::JLeaves::new(self.clone()) + /// Return a reference to an interface that provides access to Leaves operations. + pub fn leaves(&self) -> leaves::Leaves { + leaves::Leaves::new(self.clone()) } } diff --git a/rippling/src/g_saml.rs b/rippling/src/saml.rs similarity index 83% rename from rippling/src/g_saml.rs rename to rippling/src/saml.rs index fc71be0..5e541b7 100644 --- a/rippling/src/g_saml.rs +++ b/rippling/src/saml.rs @@ -2,11 +2,11 @@ use anyhow::Result; use crate::Client; #[derive(Clone, Debug)] -pub struct GSaml { +pub struct Saml { pub client: Client, } -impl GSaml { +impl Saml { #[doc(hidden)] pub fn new(client: Client) -> Self { Self { client } @@ -19,12 +19,12 @@ impl GSaml { same across all customers. It is not the same if the customer uninstalls and \ reinstalls your app. Any time a new app is installed, unique SAML Metadata will be \ generated specific to that app.\n\n```rust,no_run\nasync fn \ - example_g_saml_get_saml_idp_metadata() -> anyhow::Result<()> {\n let client = \ + example_saml_get_idp_metadata() -> anyhow::Result<()> {\n let client = \ rippling_api::Client::new_from_env();\n let result: String = \ - client.g_saml().get_saml_idp_metadata().await?;\n println!(\"{:?}\", result);\n \ + client.saml().get_idp_metadata().await?;\n println!(\"{:?}\", result);\n \ Ok(())\n}\n```"] #[tracing::instrument] - pub async fn get_saml_idp_metadata<'a>(&'a self) -> Result { + pub async fn get_idp_metadata<'a>(&'a self) -> Result { let mut req = self.client.client.request( http::Method::GET, &format!( diff --git a/specs/rippling.yaml b/specs/rippling.yaml index 508ab6f..7902d2a 100644 --- a/specs/rippling.yaml +++ b/specs/rippling.yaml @@ -22,16 +22,16 @@ servers: - url: 'https://api.rippling.com' description: Production tags: - - name: A. Companies - - name: B. Employees - - name: C. Payroll - - name: D. 401k - - name: F. Groups - - name: G. SAML - - name: E. Current User - - name: H. ATS - - name: I. Application Management - - name: J. Leaves + - name: Companies + - name: Employees + - name: Payroll + - name: 401k + - name: Groups + - name: SAML + - name: Current User + - name: ATS + - name: Application Management + - name: Leaves paths: /platform/api/companies/current: get: @@ -73,7 +73,7 @@ paths: security: - Token: [] tags: - - A. Companies + - Companies x-stoplight: id: 5p60h6uqioozm parameters: [] @@ -107,7 +107,7 @@ paths: - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/offset' tags: - - A. Companies + - Companies x-stoplight: id: sl774k0ddr3es parameters: [] @@ -177,7 +177,7 @@ paths: For optimal performance, ensure pagination is used via our limit and offset parameters. Pagination should be set to a maximum of 100. tags: - - B. Employees + - Employees parameters: - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/offset' @@ -215,7 +215,7 @@ paths: - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/offset' tags: - - A. Companies + - Companies x-stoplight: id: pqmhoffeo0egu parameters: [] @@ -298,7 +298,7 @@ paths: - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/offset' tags: - - A. Companies + - Companies x-stoplight: id: c6dqbgoi5tyir parameters: [] @@ -337,7 +337,7 @@ paths: - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/offset' tags: - - A. Companies + - Companies x-stoplight: id: qzv0ddv3ngsp3 parameters: [] @@ -373,7 +373,7 @@ paths: - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/offset' tags: - - A. Companies + - Companies x-stoplight: id: 0mz71uqr6d6uv parameters: [] @@ -447,7 +447,7 @@ paths: security: - Token: [] tags: - - B. Employees + - Employees x-stoplight: id: q28s4hbu6sqpw /platform/api/employees/include_terminated: @@ -525,13 +525,13 @@ paths: name: send_all_roles description: 'For integrations that rely on provisioning, this parameter can be used to identify non provisioned roles for compliance purposes. TRUE will return every employee from the company (bypassing any access rules).' tags: - - B. Employees + - Employees x-stoplight: id: f0wza3kg7ot43 parameters: [] /platform/api/me: get: - summary: GET Current User + summary: GCurrent User responses: '200': description: OK @@ -550,7 +550,7 @@ paths: security: - Token: [] tags: - - E. Current User + - Current User x-stoplight: id: etnldtzb56wyg parameters: [] @@ -588,7 +588,7 @@ paths: security: - Token: [] tags: - - F. Groups + - Groups x-stoplight: id: qk9ir92fyn7qr parameters: [] @@ -640,7 +640,7 @@ paths: - 5c8f7f06c592917aeee1ea9f description: A group object. tags: - - F. Groups + - Groups x-stoplight: id: jxy09npxocnck '/platform/api/groups/{groupId}': @@ -690,7 +690,7 @@ paths: version: uu8ccavwbsb8stfn description: Group updates object. tags: - - F. Groups + - Groups x-stoplight: id: us4excdz9agg0 get: @@ -729,7 +729,7 @@ paths: version: uu8ccavwbsb8stfn description: Group updates object. tags: - - F. Groups + - Groups patch: summary: PATCH Group operationId: patch-groups-groupId @@ -768,7 +768,7 @@ paths: version: yvmzhfw50hn39aas description: Group updates object. tags: - - F. Groups + - Groups x-stoplight: id: w1yvh0c4nq9ng delete: @@ -784,7 +784,7 @@ paths: security: - Token: [] tags: - - F. Groups + - Groups x-stoplight: id: bapambfnc4z0n /platform/api/leave_requests: @@ -895,7 +895,7 @@ paths: security: - Token: [] tags: - - J. Leaves + - Leaves x-stoplight: id: 46dek0wrkjep8 post: @@ -1010,7 +1010,7 @@ paths: security: - Token: [] tags: - - J. Leaves + - Leaves x-stoplight: id: 8x6t6az954nqd parameters: [] @@ -1044,7 +1044,7 @@ paths: security: - Token: [] tags: - - A. Companies + - Companies x-stoplight: id: sike025s6tfiw parameters: [] @@ -1112,7 +1112,7 @@ paths: security: - Token: [] tags: - - J. Leaves + - Leaves x-stoplight: id: p4yrmui3koqp2 parameters: [] @@ -1156,7 +1156,7 @@ paths: security: - Token: [] tags: - - J. Leaves + - Leaves x-stoplight: id: of2pp2jct60yb parameters: @@ -1203,7 +1203,7 @@ paths: Rippling's SAML Metadata is per customer app installation. It is not the same across all customers. It is not the same if the customer uninstalls and reinstalls your app. Any time a new app is installed, unique SAML Metadata will be generated specific to that app. tags: - - G. SAML + - SAML x-stoplight: id: ffogkuqtkiwcx parameters: [] @@ -1231,7 +1231,7 @@ paths: $ref: '#/components/schemas/Candidate' description: '' tags: - - H. ATS + - ATS x-stoplight: id: lwstyxi1y3j1p parameters: [] @@ -1239,7 +1239,7 @@ paths: get: summary: GET Company Activity tags: - - A. Companies + - Companies responses: '200': description: OK @@ -1363,7 +1363,7 @@ paths: - Token: [] description: Cancel a leave request. tags: - - J. Leaves + - Leaves '/platform/api/leave_requests/{id}/process': parameters: - schema: @@ -1397,7 +1397,7 @@ paths: description: The action to be taken on the leave request. Can be either approved or declined. description: Approve or decline a leave request. Only pending requests can be processed (approved / declined). Only an admin or manager is capable of taking action on a request. tags: - - J. Leaves + - Leaves x-stoplight: id: ihweo9vw3rk76 '/platform/api/leave_requests/{id}': @@ -1492,14 +1492,14 @@ paths: security: - Token: [] tags: - - J. Leaves + - Leaves x-stoplight: id: o7qcuo86folji /platform/api/app_detail/app_matching_users: get: summary: GET Matching App Users tags: - - I. Application Management + - Application Management responses: '200': description: OK @@ -1578,7 +1578,7 @@ paths: security: - Token: [] tags: - - I. Application Management + - Application Management x-stoplight: id: v584n9ie97jb7 parameters: []