Class: Tarpon::Client
- Inherits:
-
Object
show all
- Extended by:
- Forwardable
- Includes:
- Configuration
- Defined in:
- lib/tarpon/client.rb
Instance Attribute Summary
#base_uri, #http_middleware, #public_api_key, #secret_api_key, #timeout
Class Method Summary
collapse
Instance Method Summary
collapse
#configure
Constructor Details
#initialize(**config) {|_self| ... } ⇒ Client
Returns a new instance of Client.
14
15
16
17
|
# File 'lib/tarpon/client.rb', line 14
def initialize(**config, &block)
config.each { |key, val| public_send("#{key}=", val) }
yield self if block
end
|
Class Method Details
.default ⇒ Object
10
11
12
|
# File 'lib/tarpon/client.rb', line 10
def self.default
@default ||= new
end
|
Instance Method Details
#receipt ⇒ Object
29
30
31
|
# File 'lib/tarpon/client.rb', line 29
def receipt
Request::Receipt.new(client: self)
end
|
#subscriber(app_user_id) ⇒ Object
25
26
27
|
# File 'lib/tarpon/client.rb', line 25
def subscriber(app_user_id)
Request::Subscriber.new(app_user_id: app_user_id, client: self)
end
|