kentaa-api 0.4.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -13,12 +13,16 @@ module Kentaa
13
13
 
14
14
  def parent
15
15
  if segment_id
16
- Kentaa::Api::Resources::Segment.new(config, id: segment_id)
16
+ Kentaa::Api::Resources::Segment.new(config, id: segment_id, options: options)
17
17
  else
18
- Kentaa::Api::Resources::Site.new(config, id: site_id)
18
+ Kentaa::Api::Resources::Site.new(config, id: site_id, options: options)
19
19
  end
20
20
  end
21
21
 
22
+ def site
23
+ Kentaa::Api::Resources::Site.new(config, id: site_id, options: options)
24
+ end
25
+
22
26
  def slug
23
27
  data[:slug]
24
28
  end
@@ -130,9 +134,25 @@ module Kentaa
130
134
  end
131
135
 
132
136
  def consent
137
+ Kentaa::Api::Deprecation.warn('#consent is deprecated. Please use #consents instead.', caller)
138
+
133
139
  @consent ||= Kentaa::Api::Resources::Consent.new(data[:consent]) if data[:consent]
134
140
  end
135
141
 
142
+ def consents
143
+ @consents ||= begin
144
+ consents = []
145
+
146
+ if data[:consents]
147
+ data[:consents].each do |consent|
148
+ consents << Kentaa::Api::Resources::Consent.new(consent)
149
+ end
150
+ end
151
+
152
+ consents
153
+ end
154
+ end
155
+
136
156
  def contact
137
157
  @contact ||= Kentaa::Api::Resources::Contact.new(data[:contact]) if data[:contact]
138
158
  end
@@ -141,12 +161,24 @@ module Kentaa
141
161
  data[:external_reference]
142
162
  end
143
163
 
164
+ def actions
165
+ @actions ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Action, endpoint_path: "/projects/#{id}/actions")
166
+ end
167
+
168
+ def teams
169
+ @teams ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Team, endpoint_path: "/projects/#{id}/teams")
170
+ end
171
+
144
172
  def donations
145
- @donations ||= Kentaa::Api::Resources::Donations.new(config, project_id: id)
173
+ @donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Donation, endpoint_path: "/projects/#{id}/donations")
146
174
  end
147
175
 
148
176
  def manual_donations
149
- @manual_donations ||= Kentaa::Api::Resources::ManualDonations.new(config, project_id: id)
177
+ @manual_donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::ManualDonation, endpoint_path: "/projects/#{id}/manual-donations")
178
+ end
179
+
180
+ def newsletter_subscriptions
181
+ @newsletter_subscriptions ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::NewsletterSubscription, endpoint_path: "/projects/#{id}/newsletter-subscriptions")
150
182
  end
151
183
 
152
184
  private
@@ -14,6 +14,14 @@ module Kentaa
14
14
  data[:id]
15
15
  end
16
16
 
17
+ def created_at
18
+ Time.parse(data[:created_at]) if data[:created_at]
19
+ end
20
+
21
+ def updated_at
22
+ Time.parse(data[:updated_at]) if data[:updated_at]
23
+ end
24
+
17
25
  def question
18
26
  data[:question]
19
27
  end
@@ -0,0 +1,110 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bigdecimal'
4
+ require 'time'
5
+
6
+ module Kentaa
7
+ module Api
8
+ module Resources
9
+ class RecurringDonor < Resource
10
+ def object_key
11
+ "RecurringDonor_#{id}"
12
+ end
13
+
14
+ def entity
15
+ if donation_form_id
16
+ Kentaa::Api::Resources::DonationForm.new(config, id: donation_form_id, options: options)
17
+ else
18
+ Kentaa::Api::Resources::Site.new(config, id: site_id, options: options)
19
+ end
20
+ end
21
+
22
+ def site
23
+ Kentaa::Api::Resources::Site.new(config, id: site_id, options: options)
24
+ end
25
+
26
+ def site_id
27
+ data[:site_id]
28
+ end
29
+
30
+ def donation_form_id
31
+ data[:donation_form_id]
32
+ end
33
+
34
+ def first_name
35
+ data[:first_name]
36
+ end
37
+
38
+ def infix
39
+ data[:infix]
40
+ end
41
+
42
+ def last_name
43
+ data[:last_name]
44
+ end
45
+
46
+ def name
47
+ [first_name, infix, last_name].reject { |s| s.to_s.empty? }.join(' ')
48
+ end
49
+
50
+ def company
51
+ data[:company]
52
+ end
53
+
54
+ def anonymous?
55
+ data[:anonymous]
56
+ end
57
+
58
+ def email
59
+ data[:email]
60
+ end
61
+
62
+ def locale
63
+ data[:locale]
64
+ end
65
+
66
+ def frequency_type
67
+ data[:frequency_type]
68
+ end
69
+
70
+ def start_date
71
+ Date.parse(data[:start_date])
72
+ end
73
+
74
+ def end_date
75
+ Date.parse(data[:end_date]) if data[:end_date]
76
+ end
77
+
78
+ def active?
79
+ data[:active]
80
+ end
81
+
82
+ def currency
83
+ data[:currency]
84
+ end
85
+
86
+ def amount
87
+ BigDecimal(data[:amount])
88
+ end
89
+
90
+ def transaction_costs
91
+ BigDecimal(data[:transaction_costs]) if data[:transaction_costs]
92
+ end
93
+
94
+ def total_amount
95
+ BigDecimal(data[:total_amount])
96
+ end
97
+
98
+ def donations
99
+ @donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Donation, endpoint_path: "/recurring-donors/#{id}/donations")
100
+ end
101
+
102
+ private
103
+
104
+ def load_resource
105
+ request.get("/recurring-donors/#{id}", options)
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
@@ -8,14 +8,14 @@ module Kentaa
8
8
  class Resource < Base
9
9
  attr_accessor :id
10
10
 
11
- def initialize(config, options = {})
11
+ def initialize(config, id: nil, data: nil, options: {})
12
12
  super(config, options)
13
13
 
14
- if options.key?(:data)
15
- @data = options.delete(:data) || {}
14
+ if data
15
+ @data = data || {}
16
16
  @id = @data.fetch(:id) if @data.key?(:id)
17
- elsif options.key?(:id)
18
- @id = options.delete(:id)
17
+ elsif id
18
+ @id = id
19
19
  end
20
20
  end
21
21
 
@@ -40,7 +40,7 @@ module Kentaa
40
40
  def delete
41
41
  delete_resource
42
42
 
43
- self
43
+ nil
44
44
  end
45
45
 
46
46
  def created_at
@@ -11,6 +11,14 @@ module Kentaa
11
11
  "Segment_#{id}"
12
12
  end
13
13
 
14
+ def parent
15
+ site
16
+ end
17
+
18
+ def site
19
+ Kentaa::Api::Resources::Site.new(config, id: site_id, options: options)
20
+ end
21
+
14
22
  def site_id
15
23
  data[:site_id]
16
24
  end
@@ -73,12 +81,28 @@ module Kentaa
73
81
  data[:external_reference]
74
82
  end
75
83
 
84
+ def actions
85
+ @actions ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Action, endpoint_path: "/segments/#{id}/actions")
86
+ end
87
+
88
+ def teams
89
+ @teams ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Team, endpoint_path: "/segments/#{id}/teams")
90
+ end
91
+
92
+ def projects
93
+ @projects ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Project, endpoint_path: "/segments/#{id}/projects")
94
+ end
95
+
76
96
  def donations
77
- @donations ||= Kentaa::Api::Resources::Donations.new(config, segment_id: id)
97
+ @donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Donation, endpoint_path: "/segments/#{id}/donations")
78
98
  end
79
99
 
80
100
  def manual_donations
81
- @manual_donations ||= Kentaa::Api::Resources::ManualDonations.new(config, segment_id: id)
101
+ @manual_donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::ManualDonation, endpoint_path: "/segments/#{id}/manual-donations")
102
+ end
103
+
104
+ def newsletter_subscriptions
105
+ @newsletter_subscriptions ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::NewsletterSubscription, endpoint_path: "/segments/#{id}/newsletter-subscriptions")
82
106
  end
83
107
 
84
108
  private
@@ -86,17 +86,21 @@ module Kentaa
86
86
  end
87
87
 
88
88
  def donations
89
- @donations ||= Kentaa::Api::Resources::Donations.new(config)
89
+ @donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Donation, endpoint_path: '/donations')
90
90
  end
91
91
 
92
92
  def manual_donations
93
- @manual_donations ||= Kentaa::Api::Resources::ManualDonations.new(config)
93
+ @manual_donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::ManualDonation, endpoint_path: '/manual-donations')
94
+ end
95
+
96
+ def newsletter_subscriptions
97
+ @newsletter_subscriptions ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::NewsletterSubscription, endpoint_path: '/newsletter-subscriptions')
94
98
  end
95
99
 
96
100
  private
97
101
 
98
102
  def load_resource
99
- request.get("/sites/current", options)
103
+ request.get('/sites/current', options)
100
104
  end
101
105
  end
102
106
  end
@@ -2,10 +2,10 @@
2
2
 
3
3
  module Kentaa
4
4
  module Api
5
- module Clients
5
+ module Resources
6
6
  class Sites < Base
7
7
  def current(options = {})
8
- site = Kentaa::Api::Resources::Site.new(config, options)
8
+ site = Kentaa::Api::Resources::Site.new(config, options: options)
9
9
  site.load
10
10
  end
11
11
  end
@@ -13,14 +13,18 @@ module Kentaa
13
13
 
14
14
  def parent
15
15
  if project_id
16
- Kentaa::Api::Resources::Project.new(config, id: project_id)
16
+ Kentaa::Api::Resources::Project.new(config, id: project_id, options: options)
17
17
  elsif segment_id
18
- Kentaa::Api::Resources::Segment.new(config, id: segment_id)
18
+ Kentaa::Api::Resources::Segment.new(config, id: segment_id, options: options)
19
19
  else
20
- Kentaa::Api::Resources::Site.new(config, id: site_id)
20
+ Kentaa::Api::Resources::Site.new(config, id: site_id, options: options)
21
21
  end
22
22
  end
23
23
 
24
+ def site
25
+ Kentaa::Api::Resources::Site.new(config, id: site_id, options: options)
26
+ end
27
+
24
28
  def slug
25
29
  data[:slug]
26
30
  end
@@ -38,7 +42,7 @@ module Kentaa
38
42
  end
39
43
 
40
44
  def owner
41
- @owner ||= Kentaa::Api::Resources::User.new(config, data: data[:owner])
45
+ @owner ||= Kentaa::Api::Resources::User.new(config, data: data[:owner], options: options)
42
46
  end
43
47
 
44
48
  def members
@@ -47,7 +51,7 @@ module Kentaa
47
51
 
48
52
  if data[:members]
49
53
  data[:members].each do |member|
50
- members << Kentaa::Api::Resources::Action.new(config, data: member)
54
+ members << Kentaa::Api::Resources::Action.new(config, data: member, options: options)
51
55
  end
52
56
  end
53
57
 
@@ -158,11 +162,11 @@ module Kentaa
158
162
  end
159
163
 
160
164
  def donations
161
- @donations ||= Kentaa::Api::Resources::Donations.new(config, team_id: id)
165
+ @donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Donation, endpoint_path: "/teams/#{id}/donations")
162
166
  end
163
167
 
164
168
  def manual_donations
165
- @manual_donations ||= Kentaa::Api::Resources::ManualDonations.new(config, team_id: id)
169
+ @manual_donations ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::ManualDonation, endpoint_path: "/teams/#{id}/manual-donations")
166
170
  end
167
171
 
168
172
  private
@@ -10,6 +10,10 @@ module Kentaa
10
10
  "User_#{id}"
11
11
  end
12
12
 
13
+ def site
14
+ Kentaa::Api::Resources::Site.new(config, id: site_id, options: options)
15
+ end
16
+
13
17
  def site_id
14
18
  data[:site_id]
15
19
  end
@@ -27,7 +31,7 @@ module Kentaa
27
31
  end
28
32
 
29
33
  def name
30
- [first_name, infix, last_name].reject { |s| s.to_s.empty? }.join(" ")
34
+ [first_name, infix, last_name].reject { |s| s.to_s.empty? }.join(' ')
31
35
  end
32
36
 
33
37
  def email
@@ -75,7 +79,7 @@ module Kentaa
75
79
  end
76
80
 
77
81
  def birthday
78
- Time.parse(data[:birthday]) if data[:birthday]
82
+ Date.parse(data[:birthday]) if data[:birthday]
79
83
  end
80
84
 
81
85
  def gender
@@ -87,9 +91,29 @@ module Kentaa
87
91
  end
88
92
 
89
93
  def consent
94
+ Kentaa::Api::Deprecation.warn('#consent is deprecated. Please use #consents instead.', caller)
95
+
90
96
  @consent ||= Kentaa::Api::Resources::Consent.new(data[:consent]) if data[:consent]
91
97
  end
92
98
 
99
+ def consents
100
+ @consents ||= begin
101
+ consents = []
102
+
103
+ if data[:consents]
104
+ data[:consents].each do |consent|
105
+ consents << Kentaa::Api::Resources::Consent.new(consent)
106
+ end
107
+ end
108
+
109
+ consents
110
+ end
111
+ end
112
+
113
+ def actions
114
+ @actions ||= Kentaa::Api::Resources::List.new(config, resource_class: Kentaa::Api::Resources::Action, endpoint_path: "/users/#{id}/actions")
115
+ end
116
+
93
117
  private
94
118
 
95
119
  def load_resource
@@ -97,7 +121,7 @@ module Kentaa
97
121
  end
98
122
 
99
123
  def create_resource(attributes)
100
- request.post("/users", options, attributes)
124
+ request.post('/users', options, attributes)
101
125
  end
102
126
 
103
127
  def update_resource(attributes)
@@ -4,35 +4,13 @@ module Kentaa
4
4
  module Api
5
5
  module Resources
6
6
  class Users < List
7
- include Enumerable
8
-
9
- def each(&block)
10
- users.each(&block)
11
- end
12
-
13
- def create(attributes = {})
14
- user = Kentaa::Api::Resources::User.new(config, options)
15
- user.save(attributes)
16
- end
17
-
18
- private
19
-
20
- def load_resource
21
- request.get("/users", options)
7
+ def initialize(config, options = {})
8
+ super(config, options.merge(resource_class: Kentaa::Api::Resources::User, endpoint_path: '/users'))
22
9
  end
23
10
 
24
- def users
25
- @users ||= begin
26
- users = []
27
-
28
- if data
29
- data.each do |user|
30
- users << Kentaa::Api::Resources::User.new(config, data: user)
31
- end
32
- end
33
-
34
- users
35
- end
11
+ def auth(attributes, options = {})
12
+ resource = resource_class.new(config, options: options)
13
+ resource.load { request.post("#{endpoint_path}/auth", options, attributes) }
36
14
  end
37
15
  end
38
16
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Kentaa
4
+ module Api
5
+ module Util
6
+ module_function
7
+
8
+ def pluralize(string)
9
+ if string[-1] == 'y'
10
+ "#{string.chop}ies"
11
+ else
12
+ "#{string}s"
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Kentaa
4
4
  module Api
5
- VERSION = "0.4.0"
5
+ VERSION = '0.7.0'
6
6
  end
7
7
  end
data/lib/kentaa/api.rb CHANGED
@@ -1,55 +1,46 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "api/clients/base"
4
- require_relative "api/clients/actions"
5
- require_relative "api/clients/donations"
6
- require_relative "api/clients/manual_donations"
7
- require_relative "api/clients/newsletter_subscriptions"
8
- require_relative "api/clients/projects"
9
- require_relative "api/clients/segments"
10
- require_relative "api/clients/sites"
11
- require_relative "api/clients/teams"
12
- require_relative "api/clients/users"
3
+ require_relative 'api/resources/base'
4
+ require_relative 'api/resources/error'
5
+ require_relative 'api/resources/list'
6
+ require_relative 'api/resources/resource'
13
7
 
14
- require_relative "api/resources/base"
15
- require_relative "api/resources/error"
16
- require_relative "api/resources/list"
17
- require_relative "api/resources/resource"
8
+ require_relative 'api/resources/action'
9
+ require_relative 'api/resources/activity'
10
+ require_relative 'api/resources/address'
11
+ require_relative 'api/resources/banner'
12
+ require_relative 'api/resources/billing'
13
+ require_relative 'api/resources/company'
14
+ require_relative 'api/resources/company_package'
15
+ require_relative 'api/resources/consent'
16
+ require_relative 'api/resources/contact'
17
+ require_relative 'api/resources/donation_form'
18
+ require_relative 'api/resources/donation'
19
+ require_relative 'api/resources/location'
20
+ require_relative 'api/resources/manual_donation'
21
+ require_relative 'api/resources/newsletter_subscription'
22
+ require_relative 'api/resources/performance'
23
+ require_relative 'api/resources/performance_photo'
24
+ require_relative 'api/resources/photo'
25
+ require_relative 'api/resources/project'
26
+ require_relative 'api/resources/recurring_donor'
27
+ require_relative 'api/resources/registration_fee'
28
+ require_relative 'api/resources/reward'
29
+ require_relative 'api/resources/question'
30
+ require_relative 'api/resources/segment'
31
+ require_relative 'api/resources/site'
32
+ require_relative 'api/resources/sites'
33
+ require_relative 'api/resources/team'
34
+ require_relative 'api/resources/user'
35
+ require_relative 'api/resources/users'
36
+ require_relative 'api/resources/video'
18
37
 
19
- require_relative "api/resources/action"
20
- require_relative "api/resources/actions"
21
- require_relative "api/resources/activity"
22
- require_relative "api/resources/address"
23
- require_relative "api/resources/banner"
24
- require_relative "api/resources/consent"
25
- require_relative "api/resources/contact"
26
- require_relative "api/resources/donation"
27
- require_relative "api/resources/donations"
28
- require_relative "api/resources/location"
29
- require_relative "api/resources/manual_donation"
30
- require_relative "api/resources/manual_donations"
31
- require_relative "api/resources/newsletter_subscription"
32
- require_relative "api/resources/newsletter_subscriptions"
33
- require_relative "api/resources/photo"
34
- require_relative "api/resources/project"
35
- require_relative "api/resources/projects"
36
- require_relative "api/resources/question"
37
- require_relative "api/resources/registration_fee"
38
- require_relative "api/resources/reward"
39
- require_relative "api/resources/segment"
40
- require_relative "api/resources/segments"
41
- require_relative "api/resources/site"
42
- require_relative "api/resources/team"
43
- require_relative "api/resources/teams"
44
- require_relative "api/resources/user"
45
- require_relative "api/resources/users"
46
- require_relative "api/resources/video"
38
+ require_relative 'api/client'
39
+ require_relative 'api/config'
40
+ require_relative 'api/deprecation'
41
+ require_relative 'api/exception'
42
+ require_relative 'api/request'
43
+ require_relative 'api/response'
44
+ require_relative 'api/util'
47
45
 
48
- require_relative "api/client"
49
- require_relative "api/config"
50
- require_relative "api/exception"
51
- require_relative "api/finder"
52
- require_relative "api/request"
53
- require_relative "api/response"
54
-
55
- require_relative "api/version"
46
+ require_relative 'api/version'