bunny_app 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bunny_app/client.rb +1 -1
- data/lib/bunny_app/feature_usage.rb +2 -0
- data/lib/bunny_app/platform.rb +2 -0
- data/lib/bunny_app/portal_session.rb +2 -0
- data/lib/bunny_app/subscription.rb +9 -4
- data/lib/bunny_app/tenant.rb +3 -0
- data/lib/bunny_app/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 713f2dd54e42a46e2bde441a09420de5e685a00f35f0683d156a0bc25e53b1a5
|
4
|
+
data.tar.gz: adf590d8fe14df2b06399e3d1c55e1dfe3866956f5e9ce8f3596e6f451ac6637
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31fd8695d7c7b5215ecfc7420304d5a8430c95a9880dab644cf421dc0e1efa5c9c929960c6510c58efb0a6a484b78b7fbd506baba50098245e505955c642fd4e
|
7
|
+
data.tar.gz: 9167b52dd6dea36438f5c05aa93de5cc554918b5baa43517c59ca213fb5bca61670d9ad1ab982832ae8c7c26e6b1e1d8d0c8e123ec99bbefdf32c95cc7f029e6
|
data/lib/bunny_app/client.rb
CHANGED
@@ -35,6 +35,8 @@ module BunnyApp
|
|
35
35
|
variables[:attributes][:usageAt] = usage_at unless usage_at.nil?
|
36
36
|
|
37
37
|
res = Client.new.query(@feature_usage_create_mutation, variables)
|
38
|
+
raise ResponseError, res['data']['featureUsageCreate']['errors'].join(',') if res['data']['featureUsageCreate']['errors']
|
39
|
+
|
38
40
|
res['data']['featureUsageCreate']['featureUsage']
|
39
41
|
end
|
40
42
|
end
|
data/lib/bunny_app/platform.rb
CHANGED
@@ -22,6 +22,8 @@ module BunnyApp
|
|
22
22
|
}
|
23
23
|
|
24
24
|
res = Client.new.query(@platform_create_mutation, variables)
|
25
|
+
raise ResponseError, res['data']['platformCreate']['errors'].join(',') if res['data']['platformCreate']['errors']
|
26
|
+
|
25
27
|
res['data']['platformCreate']['platform']
|
26
28
|
end
|
27
29
|
end
|
@@ -17,6 +17,8 @@ module BunnyApp
|
|
17
17
|
}
|
18
18
|
|
19
19
|
res = Client.new.query(@portal_session_create_mutation, variables)
|
20
|
+
raise ResponseError, res['data']['portalSessionCreate']['errors'].join(',') if res['data']['portalSessionCreate']['errors']
|
21
|
+
|
20
22
|
res['data']['portalSessionCreate']['token']
|
21
23
|
end
|
22
24
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module BunnyApp
|
2
2
|
class Subscription
|
3
|
-
@subscription_create_mutation = <<-
|
3
|
+
@subscription_create_mutation = <<-GRAPHQL
|
4
4
|
mutation subscriptionCreate ($attributes: SubscriptionAttributes!) {
|
5
5
|
subscriptionCreate (attributes: $attributes) {
|
6
6
|
subscription {
|
@@ -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
|
@@ -38,7 +39,7 @@ module BunnyApp
|
|
38
39
|
}
|
39
40
|
GRAPHQL
|
40
41
|
|
41
|
-
@subscription_cancel_mutation = <<-
|
42
|
+
@subscription_cancel_mutation = <<-GRAPHQL
|
42
43
|
mutation subscriptionCancel ($ids: [ID!]!) {
|
43
44
|
subscriptionCancel (ids: $ids) {
|
44
45
|
errors
|
@@ -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
|
|
@@ -76,6 +78,8 @@ module BunnyApp
|
|
76
78
|
end
|
77
79
|
|
78
80
|
res = Client.new.query(@subscription_create_mutation, variables)
|
81
|
+
raise ResponseError, res['data']['subscriptionCreate']['errors'].join(',') if res['data']['subscriptionCreate']['errors']
|
82
|
+
|
79
83
|
res['data']['subscriptionCreate']['subscription']
|
80
84
|
end
|
81
85
|
|
@@ -84,7 +88,8 @@ module BunnyApp
|
|
84
88
|
ids: [subscription_id]
|
85
89
|
}
|
86
90
|
|
87
|
-
Client.new.query(@subscription_cancel_mutation, variables)
|
91
|
+
res = Client.new.query(@subscription_cancel_mutation, variables)
|
92
|
+
raise ResponseError, res['data']['subscriptionCancel']['errors'].join(',') if res['data']['subscriptionCancel']['errors']
|
88
93
|
|
89
94
|
true
|
90
95
|
end
|
data/lib/bunny_app/tenant.rb
CHANGED
@@ -52,6 +52,8 @@ module BunnyApp
|
|
52
52
|
}
|
53
53
|
|
54
54
|
res = Client.new.query(@tenant_create_mutation, variables)
|
55
|
+
raise ResponseError, res['data']['tenantCreate']['errors'].join(',') if res['data']['tenantCreate']['errors']
|
56
|
+
|
55
57
|
res['data']['tenantCreate']['tenant']
|
56
58
|
end
|
57
59
|
|
@@ -61,6 +63,7 @@ module BunnyApp
|
|
61
63
|
}
|
62
64
|
|
63
65
|
res = Client.new.query(@tenant_query, variables)
|
66
|
+
|
64
67
|
res['data']['tenant']
|
65
68
|
end
|
66
69
|
end
|
data/lib/bunny_app/version.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.1.0
|
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:
|
12
|
+
date: 2024-01-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|