bunny_app 1.22.0 → 1.24.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5c53eb110f9d41ac200c04fead7c1110a09e186d6dea4225cbd57a4f28533c6
4
- data.tar.gz: f68c49c373ca3c40e2f4203393995a8c8ae65949b24987052fca6c32780d7abc
3
+ metadata.gz: ff90fdfad4c4f392712b064e24008969d06ccd094ab0ec08c7af632fae260c6d
4
+ data.tar.gz: ad0a4ca25bf828a86aaedfa91eb2f56a4fbd7bedebaf71e250e623e37f98509a
5
5
  SHA512:
6
- metadata.gz: 3f0d7471ce7a14217f607469c46586e822221c6e98287f87b194ca265ded78448bc85a6d6c66a25d7dbd2247288708b852bacba227940bc869918d938ba8e925
7
- data.tar.gz: 63faa1a0439fd737c3dd4219a4f5b12b49cad8bb6ebb8815752fa4c72fd702883c2251167aec2c1169c6a10669f66f20f18337457b6eb948d8bd79251dee0328
6
+ metadata.gz: 3ac116e866190940b1e6287ee30107420a04191c574f54e118995fa628f5e4eda64a1f76658053051ed96e7dda790657f3ba2d05c57240e11e7eb717532b3044
7
+ data.tar.gz: da749c01c6f07a77f31a3d486353681f8226032dd36988f46f026c5e5995f46aa9f103a037170891d3d103f9dace6cd8990902e7d57cd09088192fdf083f7f82
data/README.md CHANGED
@@ -62,7 +62,7 @@ Create a config file at `config/initializers/bunny_app.rb`
62
62
 
63
63
  ```ruby
64
64
  response = BunnyApp::Subscription.create(
65
- product_plan_code: 'starter',
65
+ price_list_code: 'starter',
66
66
  options: {
67
67
  account_name: "Superdesk",
68
68
  first_name: "Meg",
@@ -3,24 +3,28 @@ module BunnyApp
3
3
  @subscription_create_mutation = <<-'GRAPHQL'
4
4
  mutation subscriptionCreate ($attributes: SubscriptionAttributes!) {
5
5
  subscriptionCreate (attributes: $attributes) {
6
- errors
7
6
  subscription {
8
7
  id
9
8
  account {
9
+ id
10
+ name
11
+ contacts {
10
12
  id
11
- name
12
- contacts {
13
- id
14
- firstName
15
- lastName
16
- }
13
+ firstName
14
+ lastName
15
+ }
17
16
  }
18
17
  trialStartDate
19
18
  trialEndDate
20
19
  startDate
21
20
  endDate
22
21
  state
23
- productPlan {
22
+ plan {
23
+ code
24
+ name
25
+ }
26
+ priceList {
27
+ code
24
28
  name
25
29
  }
26
30
  tenant {
@@ -29,21 +33,22 @@ module BunnyApp
29
33
  name
30
34
  }
31
35
  }
36
+ errors
32
37
  }
33
- }
38
+ }
34
39
  GRAPHQL
35
40
 
36
41
  # rubocop:disable Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity
37
- def self.create(product_plan_code:, options: {})
42
+ def self.create(price_list_code:, options: {})
38
43
  variables = {
39
44
  attributes: {
40
- productPlanCode: product_plan_code,
45
+ priceListCode: price_list_code,
41
46
  trial: options[:trial] || false
42
47
  }
43
48
  }
44
49
 
45
50
  if options[:account_id]
46
- variables[:attributes][:account_id] = options[:account_id]
51
+ variables[:attributes][:accountId] = options[:account_id]
47
52
  else
48
53
  variables[:attributes][:account] = {
49
54
  name: options[:account_name]&.to_s,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BunnyApp
4
- VERSION = '1.22.0'
4
+ VERSION = '1.24.0'
5
5
  end
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: 1.22.0
4
+ version: 1.24.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: 2022-12-08 00:00:00.000000000 Z
12
+ date: 2023-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty