open_recycling 0.0.3 → 0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a44449639927e8adf871ffd260f6f65cff7e353dde55d96ff7b21da3dfef6b7d
4
- data.tar.gz: 5bd9bef0572adc15f64129b9fc797cc8224c03af595dc2306c52341e0b8819a4
3
+ metadata.gz: b2d5279a6f7bd88ff9b972d74dd8c032f73b15df336e5538be78bae98aa80f27
4
+ data.tar.gz: 13e589400e3918b1e5cba7edacc5c09eb1cc15ccb178275ba4a5a1aa9acd9f61
5
5
  SHA512:
6
- metadata.gz: 21b84535fe05629fcbf50f74183bb43d6824ab870d69a3647aacb8d9a8828eb7c1498ea2355066f7b104a97781cdee81b5469e9f9ec5f5bb99b0c27519792313
7
- data.tar.gz: 8e3a7674a29d750c2891a225e339f59028a6a8bb256066665d96e1142e28b81ae4f064538db9da03e32f1c527e1913378e1672492425cc3e24e2c255c5f530d7
6
+ metadata.gz: c4d56f89fd1d7eb7a46e20dd09d89c58929280978e14a1ef500c4a157e4bcc2606d1420a79979c4eed1cbddf9bd5085740eb6b3e580deabbdfaefa764ce94333
7
+ data.tar.gz: 402e183199ad3df1adb1292ac0ccad5f253bfa341951174f86ed919381d09202cc02c904adf24cb81df8c77fa7af6e856e24e9f1350aca9480a487d668f353c1
@@ -1,4 +1,5 @@
1
1
  require_relative "invoices"
2
+ require_relative "recycling_accounts"
2
3
 
3
4
  module OpenRecycling
4
5
  module Core
@@ -10,6 +11,13 @@ module OpenRecycling
10
11
  )
11
12
  end
12
13
 
14
+ def recycling_accounts
15
+ @recycling_accounts ||= OpenRecycling::Core::RecyclingAccounts.new(
16
+ base_url: module_url,
17
+ jwt_token: jwt_token
18
+ )
19
+ end
20
+
13
21
  private
14
22
 
15
23
  def module_url
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenRecycling
4
+ module Core
5
+ class RecyclingAccounts < OpenRecycling::Resource
6
+ def initialize(base_url: nil, jwt_token: nil)
7
+ super(
8
+ root_node_singular: "recyclingAccount",
9
+ root_node_plural: "recyclingAccount",
10
+ api_url: "#{base_url}/recycling_accounts",
11
+ jwt_token: jwt_token
12
+ )
13
+ end
14
+ end
15
+ end
16
+ end
@@ -8,8 +8,8 @@ module OpenRecycling
8
8
  def initialize(base_url: nil, jwt_token: nil)
9
9
  super(
10
10
  root_node_singular: "document",
11
- root_node_plural: "document",
12
- api_url: "#{base_url}/document",
11
+ root_node_plural: "documents",
12
+ api_url: "#{base_url}/documents",
13
13
  jwt_token: jwt_token
14
14
  )
15
15
  end
@@ -1,4 +1,5 @@
1
1
  require_relative "organizations"
2
+ require_relative "organization_users"
2
3
 
3
4
  module OpenRecycling
4
5
  module Org
@@ -10,6 +11,13 @@ module OpenRecycling
10
11
  )
11
12
  end
12
13
 
14
+ def organization_users
15
+ @organization_users ||= OpenRecycling::Org::OrganizationUsers.new(
16
+ base_url: module_url,
17
+ jwt_token: jwt_token
18
+ )
19
+ end
20
+
13
21
  private
14
22
 
15
23
  def module_url
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenRecycling
4
+ module Org
5
+ class OrganizationUsers < OpenRecycling::Resource
6
+ def initialize(base_url: nil, jwt_token: nil)
7
+ super(
8
+ root_node_singular: "organization_user",
9
+ root_node_plural: "organization_users",
10
+ api_url: "#{base_url}/organization_users",
11
+ jwt_token: jwt_token
12
+ )
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenRecycling
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_recycling
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Open Recycling
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-10 00:00:00.000000000 Z
11
+ date: 2024-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -49,11 +49,13 @@ files:
49
49
  - lib/open_recycling/client_error.rb
50
50
  - lib/open_recycling/core/client.rb
51
51
  - lib/open_recycling/core/invoices.rb
52
+ - lib/open_recycling/core/recycling_accounts.rb
52
53
  - lib/open_recycling/documents/client.rb
53
54
  - lib/open_recycling/documents/documents.rb
54
55
  - lib/open_recycling/documents/uploads.rb
55
56
  - lib/open_recycling/module_client.rb
56
57
  - lib/open_recycling/org/client.rb
58
+ - lib/open_recycling/org/organization_users.rb
57
59
  - lib/open_recycling/org/organizations.rb
58
60
  - lib/open_recycling/resource.rb
59
61
  - lib/open_recycling/version.rb