bunny_app 2.0.0 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bunny_app/client.rb +4 -1
- data/lib/bunny_app/subscription.rb +3 -1
- data/lib/bunny_app/tenant_metrics.rb +26 -0
- data/lib/bunny_app/version.rb +1 -1
- data/lib/bunny_app.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0679df10d54f538c211fe1ed824c1b537d859f009ceb9131f2bb8165e14ebd8
|
4
|
+
data.tar.gz: 40ebd43e2d84bd49d9f4c224dad09d48d6a5ba07b8a6c5a67d97d1ae27db0a66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f573c0bcb3569634e4cf14590bef2bf54d9630a4425392a11a1c12b3046c182a78bb4284410645d14866ce4bfa683eaf4eb41a92fca2ecc130d1a071dd58c185
|
7
|
+
data.tar.gz: dd07c19832a5e5e81f9c4e562de088560e175214e41f2ed3bc09ac583336249fab5a3f4fc9da3d87a147df41ecb7246f5ac4f3888e5a130d9a36f62ffcfc10db
|
data/lib/bunny_app/client.rb
CHANGED
@@ -76,7 +76,10 @@ module BunnyApp
|
|
76
76
|
when /403/ # HTTP 403
|
77
77
|
raise AuthorizationError, res.parsed_response['error_decscription']
|
78
78
|
else
|
79
|
-
|
79
|
+
# HTTP 400, 500 etc
|
80
|
+
puts "Bunny SDK Response Error Headers: #{res.headers}"
|
81
|
+
puts "Bunny SDK Response Error Body: #{res.body}"
|
82
|
+
raise ResponseError, res.body
|
80
83
|
end
|
81
84
|
end
|
82
85
|
|
@@ -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
|
data/lib/bunny_app/version.rb
CHANGED
data/lib/bunny_app.rb
CHANGED
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.
|
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-
|
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
|