kentaa-api 0.4.0 → 0.7.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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +414 -66
  4. data/lib/kentaa/api/client.rb +32 -20
  5. data/lib/kentaa/api/config.rb +13 -6
  6. data/lib/kentaa/api/deprecation.rb +13 -0
  7. data/lib/kentaa/api/exception.rb +5 -2
  8. data/lib/kentaa/api/request.rb +37 -19
  9. data/lib/kentaa/api/resources/action.rb +50 -11
  10. data/lib/kentaa/api/resources/base.rb +18 -5
  11. data/lib/kentaa/api/resources/billing.rb +51 -0
  12. data/lib/kentaa/api/resources/company.rb +218 -0
  13. data/lib/kentaa/api/resources/company_package.rb +39 -0
  14. data/lib/kentaa/api/resources/consent.rb +77 -4
  15. data/lib/kentaa/api/resources/contact.rb +2 -2
  16. data/lib/kentaa/api/resources/donation.rb +45 -7
  17. data/lib/kentaa/api/resources/donation_form.rb +104 -0
  18. data/lib/kentaa/api/resources/list.rb +61 -3
  19. data/lib/kentaa/api/resources/manual_donation.rb +17 -7
  20. data/lib/kentaa/api/resources/newsletter_subscription.rb +30 -4
  21. data/lib/kentaa/api/resources/performance.rb +70 -0
  22. data/lib/kentaa/api/resources/performance_photo.rb +36 -0
  23. data/lib/kentaa/api/resources/project.rb +36 -4
  24. data/lib/kentaa/api/resources/question.rb +8 -0
  25. data/lib/kentaa/api/resources/recurring_donor.rb +110 -0
  26. data/lib/kentaa/api/resources/resource.rb +6 -6
  27. data/lib/kentaa/api/resources/segment.rb +26 -2
  28. data/lib/kentaa/api/resources/site.rb +7 -3
  29. data/lib/kentaa/api/{clients → resources}/sites.rb +2 -2
  30. data/lib/kentaa/api/resources/team.rb +11 -7
  31. data/lib/kentaa/api/resources/user.rb +27 -3
  32. data/lib/kentaa/api/resources/users.rb +5 -27
  33. data/lib/kentaa/api/util.rb +17 -0
  34. data/lib/kentaa/api/version.rb +1 -1
  35. data/lib/kentaa/api.rb +41 -50
  36. metadata +23 -46
  37. data/.gitignore +0 -16
  38. data/.rspec +0 -2
  39. data/.rubocop.yml +0 -64
  40. data/.travis.yml +0 -12
  41. data/Gemfile +0 -10
  42. data/Gemfile.lock +0 -71
  43. data/Rakefile +0 -10
  44. data/bin/console +0 -15
  45. data/bin/setup +0 -8
  46. data/kentaa-api.gemspec +0 -30
  47. data/lib/kentaa/api/clients/actions.rb +0 -34
  48. data/lib/kentaa/api/clients/base.rb +0 -15
  49. data/lib/kentaa/api/clients/donations.rb +0 -24
  50. data/lib/kentaa/api/clients/manual_donations.rb +0 -39
  51. data/lib/kentaa/api/clients/newsletter_subscriptions.rb +0 -24
  52. data/lib/kentaa/api/clients/projects.rb +0 -24
  53. data/lib/kentaa/api/clients/segments.rb +0 -24
  54. data/lib/kentaa/api/clients/teams.rb +0 -24
  55. data/lib/kentaa/api/clients/users.rb +0 -34
  56. data/lib/kentaa/api/finder.rb +0 -44
  57. data/lib/kentaa/api/resources/actions.rb +0 -40
  58. data/lib/kentaa/api/resources/donations.rb +0 -35
  59. data/lib/kentaa/api/resources/manual_donations.rb +0 -40
  60. data/lib/kentaa/api/resources/newsletter_subscriptions.rb +0 -35
  61. data/lib/kentaa/api/resources/projects.rb +0 -35
  62. data/lib/kentaa/api/resources/segments.rb +0 -35
  63. data/lib/kentaa/api/resources/teams.rb +0 -35
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kentaa-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kentaa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-31 00:00:00.000000000 Z
11
+ date: 2022-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.14'
19
+ version: '2.0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.14'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '12.3'
33
+ version: '13.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '12.3'
40
+ version: '13.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,93 +58,70 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.3'
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 2.3.2
61
+ version: '3.0'
65
62
  type: :development
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
66
  - - "~>"
70
67
  - !ruby/object:Gem::Version
71
- version: '2.3'
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: 2.3.2
68
+ version: '3.0'
75
69
  description:
76
70
  email:
77
- - support@kentaa.nl
71
+ - developers@kentaa.nl
78
72
  executables: []
79
73
  extensions: []
80
74
  extra_rdoc_files: []
81
75
  files:
82
- - ".gitignore"
83
- - ".rspec"
84
- - ".rubocop.yml"
85
- - ".travis.yml"
86
- - Gemfile
87
- - Gemfile.lock
88
76
  - LICENSE.txt
89
77
  - README.md
90
- - Rakefile
91
- - bin/console
92
- - bin/setup
93
- - kentaa-api.gemspec
94
78
  - lib/kentaa/api.rb
95
79
  - lib/kentaa/api/client.rb
96
- - lib/kentaa/api/clients/actions.rb
97
- - lib/kentaa/api/clients/base.rb
98
- - lib/kentaa/api/clients/donations.rb
99
- - lib/kentaa/api/clients/manual_donations.rb
100
- - lib/kentaa/api/clients/newsletter_subscriptions.rb
101
- - lib/kentaa/api/clients/projects.rb
102
- - lib/kentaa/api/clients/segments.rb
103
- - lib/kentaa/api/clients/sites.rb
104
- - lib/kentaa/api/clients/teams.rb
105
- - lib/kentaa/api/clients/users.rb
106
80
  - lib/kentaa/api/config.rb
81
+ - lib/kentaa/api/deprecation.rb
107
82
  - lib/kentaa/api/exception.rb
108
- - lib/kentaa/api/finder.rb
109
83
  - lib/kentaa/api/request.rb
110
84
  - lib/kentaa/api/resources/action.rb
111
- - lib/kentaa/api/resources/actions.rb
112
85
  - lib/kentaa/api/resources/activity.rb
113
86
  - lib/kentaa/api/resources/address.rb
114
87
  - lib/kentaa/api/resources/banner.rb
115
88
  - lib/kentaa/api/resources/base.rb
89
+ - lib/kentaa/api/resources/billing.rb
90
+ - lib/kentaa/api/resources/company.rb
91
+ - lib/kentaa/api/resources/company_package.rb
116
92
  - lib/kentaa/api/resources/consent.rb
117
93
  - lib/kentaa/api/resources/contact.rb
118
94
  - lib/kentaa/api/resources/donation.rb
119
- - lib/kentaa/api/resources/donations.rb
95
+ - lib/kentaa/api/resources/donation_form.rb
120
96
  - lib/kentaa/api/resources/error.rb
121
97
  - lib/kentaa/api/resources/list.rb
122
98
  - lib/kentaa/api/resources/location.rb
123
99
  - lib/kentaa/api/resources/manual_donation.rb
124
- - lib/kentaa/api/resources/manual_donations.rb
125
100
  - lib/kentaa/api/resources/newsletter_subscription.rb
126
- - lib/kentaa/api/resources/newsletter_subscriptions.rb
101
+ - lib/kentaa/api/resources/performance.rb
102
+ - lib/kentaa/api/resources/performance_photo.rb
127
103
  - lib/kentaa/api/resources/photo.rb
128
104
  - lib/kentaa/api/resources/project.rb
129
- - lib/kentaa/api/resources/projects.rb
130
105
  - lib/kentaa/api/resources/question.rb
106
+ - lib/kentaa/api/resources/recurring_donor.rb
131
107
  - lib/kentaa/api/resources/registration_fee.rb
132
108
  - lib/kentaa/api/resources/resource.rb
133
109
  - lib/kentaa/api/resources/reward.rb
134
110
  - lib/kentaa/api/resources/segment.rb
135
- - lib/kentaa/api/resources/segments.rb
136
111
  - lib/kentaa/api/resources/site.rb
112
+ - lib/kentaa/api/resources/sites.rb
137
113
  - lib/kentaa/api/resources/team.rb
138
- - lib/kentaa/api/resources/teams.rb
139
114
  - lib/kentaa/api/resources/user.rb
140
115
  - lib/kentaa/api/resources/users.rb
141
116
  - lib/kentaa/api/resources/video.rb
142
117
  - lib/kentaa/api/response.rb
118
+ - lib/kentaa/api/util.rb
143
119
  - lib/kentaa/api/version.rb
144
120
  homepage: https://github.com/KentaaNL/kentaa-api
145
121
  licenses:
146
122
  - MIT
147
- metadata: {}
123
+ metadata:
124
+ rubygems_mfa_required: 'true'
148
125
  post_install_message:
149
126
  rdoc_options: []
150
127
  require_paths:
@@ -153,14 +130,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
153
130
  requirements:
154
131
  - - ">="
155
132
  - !ruby/object:Gem::Version
156
- version: 2.3.0
133
+ version: 2.5.0
157
134
  required_rubygems_version: !ruby/object:Gem::Requirement
158
135
  requirements:
159
136
  - - ">="
160
137
  - !ruby/object:Gem::Version
161
138
  version: '0'
162
139
  requirements: []
163
- rubygems_version: 3.1.2
140
+ rubygems_version: 3.0.9
164
141
  signing_key:
165
142
  specification_version: 4
166
143
  summary: Ruby library for communicating with the Kentaa API
data/.gitignore DELETED
@@ -1,16 +0,0 @@
1
- /.bundle/
2
- /.idea
3
- /.yardoc
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- .rakeTasks
11
-
12
- # rspec failure tracking
13
- .rspec_status
14
-
15
- .ruby-version
16
- .ruby-gemset
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/.rubocop.yml DELETED
@@ -1,64 +0,0 @@
1
- # Kentaa-API RuboCop configuration
2
-
3
- require:
4
- - rubocop-performance
5
- - rubocop-rspec
6
-
7
- AllCops:
8
- TargetRubyVersion: 2.3
9
- DisplayCopNames: true
10
- DisplayStyleGuide: true
11
-
12
- Layout/LineLength:
13
- Enabled: false
14
-
15
- Metrics/AbcSize:
16
- Enabled: false
17
-
18
- Metrics/BlockLength:
19
- Enabled: false
20
-
21
- Metrics/ClassLength:
22
- Enabled: false
23
-
24
- Metrics/CyclomaticComplexity:
25
- Enabled: false
26
-
27
- Metrics/MethodLength:
28
- Enabled: false
29
-
30
- RSpec/DescribedClass:
31
- Enabled: false
32
-
33
- RSpec/ExampleLength:
34
- Enabled: false
35
-
36
- RSpec/MultipleExpectations:
37
- Enabled: false
38
-
39
- Style/Documentation:
40
- Enabled: false
41
-
42
- Style/ExpandPathArguments:
43
- Enabled: false
44
-
45
- Style/HashEachMethods:
46
- Enabled: true
47
-
48
- Style/HashTransformKeys:
49
- Enabled: true
50
-
51
- Style/HashTransformValues:
52
- Enabled: true
53
-
54
- Style/IfUnlessModifier:
55
- Enabled: false
56
-
57
- Style/SafeNavigation:
58
- Enabled: false
59
-
60
- Style/StringLiterals:
61
- Enabled: false
62
-
63
- Style/SymbolArray:
64
- Enabled: false
data/.travis.yml DELETED
@@ -1,12 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- cache: bundler
4
- before_install:
5
- - gem update --system
6
- - gem install bundler -v '< 2'
7
- rvm:
8
- - 2.3.8
9
- - 2.4.9
10
- - 2.5.7
11
- - 2.6.5
12
- - 2.7.0
data/Gemfile DELETED
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- # Specify your gem's dependencies in kentaa-api.gemspec
6
- gemspec
7
-
8
- gem 'rubocop', '~> 0.80.1'
9
- gem 'rubocop-performance', '~> 1.5.2'
10
- gem 'rubocop-rspec', '~> 1.38.1'
data/Gemfile.lock DELETED
@@ -1,71 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- kentaa-api (0.4.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- addressable (2.5.2)
10
- public_suffix (>= 2.0.2, < 4.0)
11
- ast (2.4.0)
12
- crack (0.4.3)
13
- safe_yaml (~> 1.0.0)
14
- diff-lcs (1.3)
15
- hashdiff (0.3.7)
16
- jaro_winkler (1.5.4)
17
- parallel (1.19.1)
18
- parser (2.7.0.4)
19
- ast (~> 2.4.0)
20
- public_suffix (3.0.3)
21
- rainbow (3.0.0)
22
- rake (12.3.3)
23
- rexml (3.2.4)
24
- rspec (3.8.0)
25
- rspec-core (~> 3.8.0)
26
- rspec-expectations (~> 3.8.0)
27
- rspec-mocks (~> 3.8.0)
28
- rspec-core (3.8.0)
29
- rspec-support (~> 3.8.0)
30
- rspec-expectations (3.8.2)
31
- diff-lcs (>= 1.2.0, < 2.0)
32
- rspec-support (~> 3.8.0)
33
- rspec-mocks (3.8.0)
34
- diff-lcs (>= 1.2.0, < 2.0)
35
- rspec-support (~> 3.8.0)
36
- rspec-support (3.8.0)
37
- rubocop (0.80.1)
38
- jaro_winkler (~> 1.5.1)
39
- parallel (~> 1.10)
40
- parser (>= 2.7.0.1)
41
- rainbow (>= 2.2.2, < 4.0)
42
- rexml
43
- ruby-progressbar (~> 1.7)
44
- unicode-display_width (>= 1.4.0, < 1.7)
45
- rubocop-performance (1.5.2)
46
- rubocop (>= 0.71.0)
47
- rubocop-rspec (1.38.1)
48
- rubocop (>= 0.68.1)
49
- ruby-progressbar (1.10.1)
50
- safe_yaml (1.0.4)
51
- unicode-display_width (1.6.1)
52
- webmock (2.3.2)
53
- addressable (>= 2.3.6)
54
- crack (>= 0.3.2)
55
- hashdiff
56
-
57
- PLATFORMS
58
- ruby
59
-
60
- DEPENDENCIES
61
- bundler (~> 1.14)
62
- kentaa-api!
63
- rake (~> 12.3)
64
- rspec (~> 3.0)
65
- rubocop (~> 0.80.1)
66
- rubocop-performance (~> 1.5.2)
67
- rubocop-rspec (~> 1.38.1)
68
- webmock (~> 2.3, >= 2.3.2)
69
-
70
- BUNDLED WITH
71
- 1.17.3
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
5
- require "rubocop/rake_task"
6
-
7
- RSpec::Core::RakeTask.new(:spec)
8
- RuboCop::RakeTask.new(:rubocop)
9
-
10
- task default: [:spec, :rubocop]
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "kentaa/api"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/kentaa-api.gemspec DELETED
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- lib = File.expand_path('../lib', __FILE__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'kentaa/api/version'
6
-
7
- Gem::Specification.new do |spec|
8
- spec.name = "kentaa-api"
9
- spec.version = Kentaa::Api::VERSION
10
- spec.authors = ["Kentaa"]
11
- spec.email = ["support@kentaa.nl"]
12
-
13
- spec.summary = "Ruby library for communicating with the Kentaa API"
14
- spec.homepage = "https://github.com/KentaaNL/kentaa-api"
15
- spec.license = "MIT"
16
-
17
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
- f.match(%r{^(test|spec|features)/})
19
- end
20
- spec.bindir = "exe"
21
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
- spec.require_paths = ["lib"]
23
-
24
- spec.required_ruby_version = ">= 2.3.0"
25
-
26
- spec.add_development_dependency "bundler", "~> 1.14"
27
- spec.add_development_dependency "rake", "~> 12.3"
28
- spec.add_development_dependency "rspec", "~> 3.0"
29
- spec.add_development_dependency "webmock", "~> 2.3", ">= 2.3.2"
30
- end
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Kentaa
4
- module Api
5
- module Clients
6
- class Actions < Base
7
- def all(options = {})
8
- actions = Kentaa::Api::Resources::Actions.new(config, options)
9
- actions.all
10
- end
11
-
12
- def list(options = {})
13
- actions = Kentaa::Api::Resources::Actions.new(config, options)
14
- actions.load
15
- end
16
-
17
- def get(id, options = {})
18
- action = Kentaa::Api::Resources::Action.new(config, options.merge(id: id))
19
- action.load
20
- end
21
-
22
- def create(attributes = {}, options = {})
23
- action = Kentaa::Api::Resources::Actions.new(config, options)
24
- action.create(attributes)
25
- end
26
-
27
- def update(id, attributes = {}, options = {})
28
- action = Kentaa::Api::Resources::Action.new(config, options.merge(id: id))
29
- action.save(attributes)
30
- end
31
- end
32
- end
33
- end
34
- end
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Kentaa
4
- module Api
5
- module Clients
6
- class Base
7
- attr_reader :config
8
-
9
- def initialize(config)
10
- @config = config
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Kentaa
4
- module Api
5
- module Clients
6
- class Donations < Base
7
- def all(options = {})
8
- donations = Kentaa::Api::Resources::Donations.new(config, options)
9
- donations.all
10
- end
11
-
12
- def list(options = {})
13
- donations = Kentaa::Api::Resources::Donations.new(config, options)
14
- donations.load
15
- end
16
-
17
- def get(id, options = {})
18
- donation = Kentaa::Api::Resources::Donation.new(config, options.merge(id: id))
19
- donation.load
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Kentaa
4
- module Api
5
- module Clients
6
- class ManualDonations < Base
7
- def all(options = {})
8
- donations = Kentaa::Api::Resources::ManualDonations.new(config, options)
9
- donations.all
10
- end
11
-
12
- def list(options = {})
13
- donations = Kentaa::Api::Resources::ManualDonations.new(config, options)
14
- donations.load
15
- end
16
-
17
- def get(id, options = {})
18
- donation = Kentaa::Api::Resources::ManualDonation.new(config, options.merge(id: id))
19
- donation.load
20
- end
21
-
22
- def create(attributes = {}, options = {})
23
- donation = Kentaa::Api::Resources::ManualDonation.new(config, options)
24
- donation.save(attributes)
25
- end
26
-
27
- def update(id, attributes = {}, options = {})
28
- donation = Kentaa::Api::Resources::ManualDonation.new(config, options.merge(id: id))
29
- donation.save(attributes)
30
- end
31
-
32
- def delete(id, options = {})
33
- donation = Kentaa::Api::Resources::ManualDonation.new(config, options.merge(id: id))
34
- donation.delete
35
- end
36
- end
37
- end
38
- end
39
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Kentaa
4
- module Api
5
- module Clients
6
- class NewsletterSubscriptions < Base
7
- def all(options = {})
8
- newsletter_subscriptions = Kentaa::Api::Resources::NewsletterSubscriptions.new(config, options)
9
- newsletter_subscriptions.all
10
- end
11
-
12
- def list(options = {})
13
- newsletter_subscriptions = Kentaa::Api::Resources::NewsletterSubscriptions.new(config, options)
14
- newsletter_subscriptions.load
15
- end
16
-
17
- def get(id, options = {})
18
- newsletter_subscription = Kentaa::Api::Resources::NewsletterSubscription.new(config, options.merge(id: id))
19
- newsletter_subscription.load
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Kentaa
4
- module Api
5
- module Clients
6
- class Projects < Base
7
- def all(options = {})
8
- projects = Kentaa::Api::Resources::Projects.new(config, options)
9
- projects.all
10
- end
11
-
12
- def list(options = {})
13
- projects = Kentaa::Api::Resources::Projects.new(config, options)
14
- projects.load
15
- end
16
-
17
- def get(id, options = {})
18
- project = Kentaa::Api::Resources::Project.new(config, options.merge(id: id))
19
- project.load
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Kentaa
4
- module Api
5
- module Clients
6
- class Segments < Base
7
- def all(options = {})
8
- segments = Kentaa::Api::Resources::Segments.new(config, options)
9
- segments.all
10
- end
11
-
12
- def list(options = {})
13
- segments = Kentaa::Api::Resources::Segments.new(config, options)
14
- segments.load
15
- end
16
-
17
- def get(id, options = {})
18
- segment = Kentaa::Api::Resources::Segment.new(config, options.merge(id: id))
19
- segment.load
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Kentaa
4
- module Api
5
- module Clients
6
- class Teams < Base
7
- def all(options = {})
8
- teams = Kentaa::Api::Resources::Teams.new(config, options)
9
- teams.all
10
- end
11
-
12
- def list(options = {})
13
- teams = Kentaa::Api::Resources::Teams.new(config, options)
14
- teams.load
15
- end
16
-
17
- def get(id, options = {})
18
- team = Kentaa::Api::Resources::Team.new(config, options.merge(id: id))
19
- team.load
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Kentaa
4
- module Api
5
- module Clients
6
- class Users < Base
7
- def all(options = {})
8
- users = Kentaa::Api::Resources::Users.new(config, options)
9
- users.all
10
- end
11
-
12
- def list(options = {})
13
- users = Kentaa::Api::Resources::Users.new(config, options)
14
- users.load
15
- end
16
-
17
- def get(id, options = {})
18
- user = Kentaa::Api::Resources::User.new(config, options.merge(id: id))
19
- user.load
20
- end
21
-
22
- def create(attributes = {}, options = {})
23
- user = Kentaa::Api::Resources::Users.new(config, options)
24
- user.create(attributes)
25
- end
26
-
27
- def update(id, attributes = {}, options = {})
28
- user = Kentaa::Api::Resources::User.new(config, options.merge(id: id))
29
- user.save(attributes)
30
- end
31
- end
32
- end
33
- end
34
- end