bunny_app 2.0.1 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddee2a75dd5e0d155b6262ef9a0af252be0da7a23bf65c5b7082afe8f87944b4
4
- data.tar.gz: 3ff475f3847b63fb0b0a2b779bf3df21f0ba5ed6d8cc682764e60b0b71eab2e9
3
+ metadata.gz: a0679df10d54f538c211fe1ed824c1b537d859f009ceb9131f2bb8165e14ebd8
4
+ data.tar.gz: 40ebd43e2d84bd49d9f4c224dad09d48d6a5ba07b8a6c5a67d97d1ae27db0a66
5
5
  SHA512:
6
- metadata.gz: 634afceda6fe87a0de908fdfd8926dde84c48d0d8a56ebc54d4a08defb94ab3ace346646ec037eb5c6ded014788beeb5602cb1c0560a69c0ac2e47a8a22355ce
7
- data.tar.gz: e0c605da0b2f6e53f2aef46e62067e1f575d73641d16eaf9b246ae6291c4e3b8903dd8f4f38a46ef5e83eae3008fb78b0e241ea7e00397582863f34ac097cca7
6
+ metadata.gz: f573c0bcb3569634e4cf14590bef2bf54d9630a4425392a11a1c12b3046c182a78bb4284410645d14866ce4bfa683eaf4eb41a92fca2ecc130d1a071dd58c185
7
+ data.tar.gz: dd07c19832a5e5e81f9c4e562de088560e175214e41f2ed3bc09ac583336249fab5a3f4fc9da3d87a147df41ecb7246f5ac4f3888e5a130d9a36f62ffcfc10db
@@ -19,6 +19,7 @@ module BunnyApp
19
19
  startDate
20
20
  endDate
21
21
  state
22
+ evergreen
22
23
  plan {
23
24
  code
24
25
  name
@@ -51,7 +52,8 @@ module BunnyApp
51
52
  variables = {
52
53
  attributes: {
53
54
  priceListCode: price_list_code,
54
- trial: options[:trial] || false
55
+ trial: options[:trial] || false,
56
+ evergreen: options[:evergreen] || false
55
57
  }
56
58
  }
57
59
 
@@ -0,0 +1,26 @@
1
+ module BunnyApp
2
+ class TenantMetrics
3
+ @tenant_metrics_update_mutation = <<-'GRAPHQL'
4
+ mutation tenantMetricsUpdate ($code: String!, $attributes: TenantMetricsAttributes!) {
5
+ tenantMetricsUpdate (code: $code, attributes: $attributes) {
6
+ errors
7
+ }
8
+ }
9
+ GRAPHQL
10
+
11
+ def self.update(code:, last_login:, user_count:, utilization_metrics: {})
12
+ variables = {
13
+ code:,
14
+ attributes: {
15
+ lastLogin: last_login,
16
+ userCount: user_count,
17
+ utilizationMetrics: utilization_metrics
18
+ }
19
+ }
20
+
21
+ Client.new.query(@tenant_metrics_update_mutation, variables)
22
+
23
+ true
24
+ end
25
+ end
26
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BunnyApp
4
- VERSION = '2.0.1'
4
+ VERSION = '2.0.4'
5
5
  end
data/lib/bunny_app.rb CHANGED
@@ -7,6 +7,7 @@ require 'bunny_app/tenant'
7
7
  require 'bunny_app/subscription'
8
8
  require 'bunny_app/webhook'
9
9
  require 'bunny_app/portal_session'
10
+ require 'bunny_app/tenant_metrics'
10
11
 
11
12
  module BunnyApp
12
13
  class << self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bunny_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bunny
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-09-05 00:00:00.000000000 Z
12
+ date: 2023-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -144,6 +144,7 @@ files:
144
144
  - lib/bunny_app/portal_session.rb
145
145
  - lib/bunny_app/subscription.rb
146
146
  - lib/bunny_app/tenant.rb
147
+ - lib/bunny_app/tenant_metrics.rb
147
148
  - lib/bunny_app/version.rb
148
149
  - lib/bunny_app/webhook.rb
149
150
  - lib/generators/bunny_app/install_generator.rb