Skip to main content
All CollectionsFeaturesSDKs
Advanced Ruby SDK migration guide
Advanced Ruby SDK migration guide

Support for migrating to our Advanced Ruby SDK!

Updated over 6 months ago

Based on customer feedback, we have been working on improving our all-category SDKs. We recently released our Advanced Ruby SDK. It is currently available for anyone to use.

Note that the existing Ruby SDKs are fully functional and will continue to work. There are key benefits in using this Advanced SDK. We strongly recommend to use the new SDKs. You’ll play an integral role in providing feedback on our SDKs, making them more usable and robust and get a head start on migrating over. We would love any and all feedback by reaching out to your engagement manager or [email protected]. All your feedback will be promptly addressed.

Migration Guide

This guide is for Merge customers using the Gen-0 Ruby SDKs:

Generation

SDK Name

Github

Package Name

0

Merge HRIS Ruby

MergeHRISClient

0

Merge ATS Ruby

MergeATSClient

0

Merge Accounting Ruby

MergeAccountingClient

0

Merge Ticketing Ruby

MergeTicketingClient

0

Merge CRM Ruby

MergeCRMClient

We recommend all customers move to the Advanced SDK:

This SDK has the following advantages

Feature

Description

Regular updates and priority support


The new SDK will have regular updates to keep it up to date with the latest changes to the API and feature improvements, along with priority support to help address any issues quickly.

Snippets/example usage embedded within the SDK’s documentation

Inline examples of function usage combined with comprehensive snippets of code in the Merge Docs makes new implementation easier than the legacy SDK.

First class async support

The new SDK leverages https://github.com/socketry/async under the hood to allow for an async/await pattern that's pretty new to Ruby. In newer versions of Ruby, it leverages Fibers under the hood which is an improved threading paradigm in Ruby.
All the user needs to do is use the async client to leverage all the advantages of async functions.

async_client = Merge::AsyncClient.new(api_key: ENV["MERGE_API_KEY"],account_token: ENV["MERGE_ACCOUNT_TOKEN"])

Sync do
ad_async = async_client.ats.account_details.retrieve
assert ad_async.instance_of?(Async::Task)
assert ad_async.wait.account_type == "TEST"

end

Unified SDK (e.g. only one gem to install)

Merge previously only had single category offerings of our SDKs. Now, becoming a multicategory user of Merge requires only installing the one Ruby gem. Your internal Merge implementation becomes even more lightweight.

Improved type hinting and yardoc support

In addition to the basic yardoc usage in the existing SDK, the same is applied the models. This way you get inputs, outputs, and examples documented and type-hinted for both functions and models.

This SDK has all Merge categories, which makes it easy for Merge customers to find all endpoint methods in one package. The earlier single-category SDKs as well as the multi-category SDK all have the same style of method call, so let’s consider what it looks like to move from an existing employees list call to the new SDK.

Earlier SDK Code

# Load the gem 
require 'merge_ats_client'

# Setup authorization
MergeATSClient.configure do |config|
# Configure API key authorization: tokenAuth
config.api_key['tokenAuth'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['tokenAuth'] = 'Bearer'
end

api_instance = MergeATSClient::AccountDetailsApi.new
result = api_instance.account_details_retrieve('YOUR_ACCOUNT_TOKEN')
puts result

Advanced SDK Equivalent

# Load the gem 
require "merge_ruby_client"

# Setup authorization
merge = Merge::Client.new( api_key: 'YOUR_API_KEY' )
result = merge.ats.account_details.retrieve(account_token:'YOUR_ACCOUNT_TOKEN')
puts result

Did this answer your question?