Project

kombo

0.0
The project is in a healthy, maintained state
Ruby Client SDK Generated by Kombo
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
>= 5.27.0
>= 0
~> 1.73.2
~> 0.6.12872
~> 0.17.10
~> 0.2.0

Runtime

>= 0.2.0, < 1.0
~> 0.6.12872
 Project Readme

openapi

Developer-friendly & type-safe Ruby SDK specifically catered to leverage openapi API.

Built by Speakeasy License: MIT



Important

This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your workspace. Delete this section before > publishing to a package manager.

Summary

Table of Contents

  • openapi
    • SDK Installation
    • SDK Example Usage
    • Authentication
    • Available Resources and Operations
    • Global Parameters
    • Error Handling
    • Server Selection
  • Development
    • Maturity
    • Contributions

SDK Installation

The SDK can be installed using RubyGems:

gem install kombo

SDK Example Usage

Example

require 'kombo'

Models = ::OpenApiSDK::Models
s = ::OpenApiSDK::Kombo.new(
      security: Models::Shared::Security.new(
        api_key: '<YOUR_BEARER_TOKEN_HERE>',
      ),
    )

res = s.general.check_api_key()

unless res.get_check_api_key_positive_response.nil?
  # handle response
end

Authentication

Per-Client Security Schemes

This SDK supports the following security scheme globally:

Name Type Scheme
api_key http HTTP Bearer

You can set the security parameters through the security optional parameter when initializing the SDK client instance. For example:

require 'kombo'

Models = ::OpenApiSDK::Models
s = ::OpenApiSDK::Kombo.new(
      security: Models::Shared::Security.new(
        api_key: '<YOUR_BEARER_TOKEN_HERE>',
      ),
    )

res = s.general.check_api_key()

unless res.get_check_api_key_positive_response.nil?
  # handle response
end

Available Resources and Operations

Available methods

Global Parameters

A parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.

For example, you can set integration_id to 'workday:HWUTwvyx2wLoSUHphiWVrp28' at SDK initialization and then you do not have to pass the same value on calls to operations like delete_integration. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.

Available Globals

The following global parameter is available.

Name Type Description
integration_id ::String ID of the integration you want to interact with.

Example

require 'kombo'

Models = ::OpenApiSDK::Models
s = ::OpenApiSDK::Kombo.new(
      integration_id: 'workday:HWUTwvyx2wLoSUHphiWVrp28',
      security: Models::Shared::Security.new(
        api_key: '<YOUR_BEARER_TOKEN_HERE>',
      ),
    )

res = s.general.delete_integration(integration_id: '<id>', body: Models::Shared::DeleteIntegrationsIntegrationIdRequestBody.new())

unless res.delete_integrations_integration_id_positive_response.nil?
  # handle response
end

Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error.

By default an API error will raise a Errors::APIError, which has the following properties:

Property Type Description
message string The error message
status_code int The HTTP status code
raw_response Faraday::Response The raw HTTP response
body string The response content

When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective Errors tables in SDK docs for more details on possible exception types for each operation. For example, the check_api_key method throws the following exceptions:

Error Type Status Code Content Type
Models::Errors::KomboGeneralError default application/json
Errors::APIError 4XX, 5XX */*

Example

require 'kombo'

Models = ::OpenApiSDK::Models
s = ::OpenApiSDK::Kombo.new(
      security: Models::Shared::Security.new(
        api_key: '<YOUR_BEARER_TOKEN_HERE>',
      ),
    )

begin
    res = s.general.check_api_key()

    unless res.get_check_api_key_positive_response.nil?
      # handle response
    end
rescue Models::Errors::KomboGeneralError => e
  # handle e.container data
  raise e
rescue Errors::APIError => e
  # handle default exception
  raise e
end

Server Selection

Select Server by Name

You can override the default server globally by passing a server name to the server (Symbol) optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:

Name Server Description
eu https://api.kombo.dev/v1 Kombo EU Region
us https://api.us.kombo.dev/v1 Kombo US Region

Example

require 'kombo'

Models = ::OpenApiSDK::Models
s = ::OpenApiSDK::Kombo.new(
      server: "eu",
      security: Models::Shared::Security.new(
        api_key: '<YOUR_BEARER_TOKEN_HERE>',
      ),
    )

res = s.general.check_api_key()

unless res.get_check_api_key_positive_response.nil?
  # handle response
end

Override Server URL Per-Client

The default server can also be overridden globally by passing a URL to the server_url (String) optional parameter when initializing the SDK client instance. For example:

require 'kombo'

Models = ::OpenApiSDK::Models
s = ::OpenApiSDK::Kombo.new(
      server_url: 'https://api.kombo.dev/v1',
      security: Models::Shared::Security.new(
        api_key: '<YOUR_BEARER_TOKEN_HERE>',
      ),
    )

res = s.general.check_api_key()

unless res.get_check_api_key_positive_response.nil?
  # handle response
end

Development

Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.

SDK Created by Speakeasy