Class: Polar::Client
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Pagination
#auto_paginate, #paginate
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
9
10
11
12
13
|
# File 'lib/polar/client.rb', line 9
def initialize(options = {})
@configuration = build_configuration(options)
@auth = build_authentication(options)
@http_client = HTTPClient.new(@configuration, @auth)
end
|
Instance Attribute Details
#auth ⇒ Object
Returns the value of attribute auth.
7
8
9
|
# File 'lib/polar/client.rb', line 7
def auth
@auth
end
|
#configuration ⇒ Object
Returns the value of attribute configuration.
7
8
9
|
# File 'lib/polar/client.rb', line 7
def configuration
@configuration
end
|
#http_client ⇒ Object
Returns the value of attribute http_client.
7
8
9
|
# File 'lib/polar/client.rb', line 7
def http_client
@http_client
end
|
Instance Method Details
#benefits ⇒ Object
44
45
46
|
# File 'lib/polar/client.rb', line 44
def benefits
@benefits ||= Resources::Benefits.new(self)
end
|
#checkouts ⇒ Object
40
41
42
|
# File 'lib/polar/client.rb', line 40
def checkouts
@checkouts ||= Resources::Checkouts.new(self)
end
|
#customer_portal ⇒ Object
73
74
75
|
# File 'lib/polar/client.rb', line 73
def customer_portal
@customer_portal ||= CustomerPortalClient.new(self)
end
|
#customers ⇒ Object
24
25
26
|
# File 'lib/polar/client.rb', line 24
def customers
@customers ||= Resources::Customers.new(self)
end
|
#events ⇒ Object
60
61
62
|
# File 'lib/polar/client.rb', line 60
def events
@events ||= Resources::Events.new(self)
end
|
#files ⇒ Object
52
53
54
|
# File 'lib/polar/client.rb', line 52
def files
@files ||= Resources::Files.new(self)
end
|
#license_keys ⇒ Object
48
49
50
|
# File 'lib/polar/client.rb', line 48
def license_keys
@license_keys ||= Resources::LicenseKeys.new(self)
end
|
#metrics ⇒ Object
56
57
58
|
# File 'lib/polar/client.rb', line 56
def metrics
@metrics ||= Resources::Metrics.new(self)
end
|
#oauth2 ⇒ Object
68
69
70
|
# File 'lib/polar/client.rb', line 68
def oauth2
@oauth2 ||= Resources::OAuth2.new(self)
end
|
#orders ⇒ Object
28
29
30
|
# File 'lib/polar/client.rb', line 28
def orders
@orders ||= Resources::Orders.new(self)
end
|
#organizations ⇒ Object
16
17
18
|
# File 'lib/polar/client.rb', line 16
def organizations
@organizations ||= Resources::Organizations.new(self)
end
|
#payments ⇒ Object
32
33
34
|
# File 'lib/polar/client.rb', line 32
def payments
@payments ||= Resources::Payments.new(self)
end
|
#products ⇒ Object
20
21
22
|
# File 'lib/polar/client.rb', line 20
def products
@products ||= Resources::Products.new(self)
end
|
#subscriptions ⇒ Object
36
37
38
|
# File 'lib/polar/client.rb', line 36
def subscriptions
@subscriptions ||= Resources::Subscriptions.new(self)
end
|
#webhooks ⇒ Object
64
65
66
|
# File 'lib/polar/client.rb', line 64
def webhooks
@webhooks ||= Resources::Webhooks.new(self)
end
|