New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
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

  • 2.295.1
  • Rubygems
  • Socket score

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:


require("stigg_sidecar_sdk")

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: 8443)

Get single entitlement of a customer


require("stigg_sidecar_sdk")

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 27 Jan 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc