Sha256: f6e6d49427a97887d7d83578ae1a725f33203812ea43805a082fe3eb75ecba4b
Contents?: true
Size: 981 Bytes
Versions: 12
Compression:
Stored size: 981 Bytes
Contents
module BunnyApp class Usage @feature_usage_create_mutation = <<-'GRAPHQL' mutation featureUsageCreate ($attributes: FeatureUsageAttributes!) { featureUsageCreate (attributes: $attributes) { errors featureUsage { id quantity usageAt tenant { id code name } feature { id code name } } } } GRAPHQL def self.track(quantity:, feature_code:, tenant_code:, usage_at: nil) variables = { attributes: { quantity:, featureCode: feature_code, tenantCode: tenant_code } } variables[:attributes][:usageAt] = usage_at unless usage_at.nil? Client.new.query(@feature_usage_create_mutation, variables) end end end
Version data entries
12 entries across 12 versions & 1 rubygems