Skip to content

Commit

Permalink
rippling-apis
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Sep 16, 2024
1 parent c96c30a commit 3f8c651
Show file tree
Hide file tree
Showing 37 changed files with 18,869 additions and 18,907 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
"ramp",
"remote",
"rippling",
"rippling-beta",
"rippling-base",
"twilio",
"vercel",
]
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,26 @@ remote: openapitor
--request-timeout-seconds 60 \
--date-time-format "%Y-%m-%dT%H:%M:%S" $(EXTRA_ARGS)

.PHONY: rippling
rippling: openapitor
.PHONY: rippling-base
rippling-base: openapitor
$(openapitor_exe) \
--input specs/rippling.yaml \
--target-version 0.1.3 \
--output ./rippling \
--name rippling-api \
--description "A fully generated & opinionated API client for the Rippling API." \
--target-version 0.1.0 \
--output ./rippling-base \
--name rippling-base-api \
--description "A fully generated & opinionated API client for the Rippling Base API." \
--base-url "https://api.rippling.com" \
--request-timeout-seconds 60 \
--date-time-format "%Y-%m-%dT%H:%M:%S" $(EXTRA_ARGS)

.PHONY: rippling-beta
rippling-beta: openapitor
.PHONY: rippling
rippling: openapitor
$(openapitor_exe) \
--input specs/rippling-beta.yaml \
--target-version 0.1.0 \
--output ./rippling-beta \
--name rippling-beta-api \
--description "A fully generated & opinionated API client for the Rippling Beta API." \
--target-version 0.1.3 \
--output ./rippling \
--name rippling-api \
--description "A fully generated & opinionated API client for the Rippling API." \
--base-url "https://rest.ripplingapis.com" \
--request-timeout-seconds 60 \
--date-time-format "%Y-%m-%dT%H:%M:%S" $(EXTRA_ARGS)
Expand Down
6 changes: 3 additions & 3 deletions rippling-beta/Cargo.toml → rippling-base/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "rippling-beta-api"
description = "A fully generated & opinionated API client for the Rippling Beta API."
name = "rippling-base-api"
description = "A fully generated & opinionated API client for the Rippling Base API."
version = "0.1.0"
documentation = "https://docs.rs/rippling-beta-api"
documentation = "https://docs.rs/rippling-base-api"
readme = "README.md"

edition = "2018"
Expand Down
75 changes: 75 additions & 0 deletions rippling-base/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# `rippling-base-api`

A fully generated & opinionated API client for the Rippling Base API.

[![docs.rs](https://docs.rs/rippling-base-api/badge.svg)](https://docs.rs/rippling-base-api)

## API Details

Using Rippling's API requires either an API key or an access token retrieved from an OAuth exchange. Each is tied to a single Rippling Company.

If you are a partner building an integration to Rippling,you can use [Rippling's Installation Guide](https://developer.rippling.com/docs/rippling-api/fucwnbc121hiu-installation-guide) to learn how to retrieve an access token to start using Rippling APIs.

If you are a customer, you can go [here](https://developer.rippling.com/docs/rippling-api/9rw6guf819r5f-introduction-for-customers) to learn create your API keys to start using Rippling APIs.

### Using the Interactive Documentation

Rippling's Documentation Portal allows you to test the API endpoints directly within the documentation. To do so, provide your API key or Access Token as a header parameter with the form Authorization Bearer: Bearer.

[API Terms of Service](https://app.rippling.com/developer/tos)

### Contact


| name | email |
|----|----|
| Rippling Support | [email protected] |

### License


| name |
|----|
| MIT |


## Client Details



The documentation for the crate is generated
along with the code to make this library easy to use.


To install the library, add the following to your `Cargo.toml` file.

```toml
[dependencies]
rippling-base-api = "0.1.0"
```

## Basic example

Typical use will require intializing a `Client`. This requires
a user agent string and set of credentials.

```rust,no_run
use rippling_base_api::Client;
let client = Client::new(
String::from("api-key"),
);
```

Alternatively, the library can search for most of the variables required for
the client in the environment:

- `RIPPLING_BASE_API_TOKEN`

And then you can create a client from the environment.

```rust,no_run
use rippling_base_api::Client;
let client = Client::new_from_env();
```
242 changes: 242 additions & 0 deletions rippling-base/rippling-base-api.rs.patch.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl ApplicationManagement {
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<String>`: 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```"]
#[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<String>`: 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_base_api::Client::new_from_env();\n let result: rippling_base_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,
Expand Down Expand Up @@ -56,8 +56,8 @@ impl ApplicationManagement {
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 \
let client = rippling_base_api::Client::new_from_env();\n let result: \
rippling_base_api::types::PostMarkAppInstalledResponse = client\n \
.application_management()\n .post_mark_app_installed()\n .await?;\n \
println!(\"{:?}\", result);\n Ok(())\n}\n```"]
#[tracing::instrument]
Expand Down
2 changes: 1 addition & 1 deletion rippling/src/ats.rs → rippling-base/src/ats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl Ats {
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_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```"]
#[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_base_api::Client::new_from_env();\n let result: rippling_base_api::types::Candidate = client\n .ats()\n .post_candidates_push_candidate(&rippling_base_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_base_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_base_api::types::CandidateEmploymentType::Temp),\n work_location: Some(\"some-string\".to_string()),\n attachments: Some(vec![rippling_base_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_candidates_push_candidate<'a>(
&'a self,
Expand Down
Loading

0 comments on commit 3f8c651

Please sign in to comment.