Socket
Book a DemoInstallSign in
Socket

stigg-sidecar-sdk

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stigg-sidecar-sdk

bundlerRubygems
Version
3.98.0
Version published
Maintainers
1
Created
Source

stigg-sidecar-sdk

Stigg Ruby SDK makes it easier to interact with Stigg Sidecar

Documentation

See https://docs.stigg.io/docs/sidecar-sdk

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add stigg-sidecar-sdk

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install stigg-sidecar-sdk

Usage

Initialize the client:


api_key = ENV["STIGG_SERVER_API_KEY"]

client = Stigg::Sidecar.create_client(Stigg::Sidecar::ApiConfig.new(api_key),
                                      remote_sidecar_host: "localhost",
                                      remote_sidecar_port: 80)

Get single entitlement of a customer


client = Stigg::Sidecar.create_client(Stigg::Sidecar::ApiConfig.new(api_key))

entitlement = client.get_metered_entitlement(
  Stigg::Sidecar::V1::GetMeteredEntitlementRequest.new(customer_id: "customer-demo-01",
                                                       feature_id: "feature-01-templates",
                                                       options: Stigg::Sidecar::V1::MeteredEntitlementOptions.new(
                                                         requested_usage: 1
                                                       ))
)

p "Has access: #{entitlement.has_access}"

Accessing the api client:


client = Stigg::Sidecar.create_client(Stigg::Sidecar::ApiConfig.new(api_key))

customer_resp = client.api.request(
  Stigg::Mutation::ProvisionCustomer, {
  "input": {
    "customerId": "customer-demo-104",
    "name": "customer name"
  }
}
)

p "Customer created: #{customer_resp.data.provision_customer.customer.ref_id}"

FAQs

Package last updated on 25 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts