class Tarpon::Request::Subscriber

Public Class Methods

new(app_user_id:) click to toggle source
# File lib/tarpon/request/subscriber.rb, line 6
def initialize(app_user_id:)
  @app_user_id = app_user_id
end

Public Instance Methods

delete() click to toggle source

rubocop:enable Naming/AccessorMethodName

# File lib/tarpon/request/subscriber.rb, line 16
def delete
  perform(method: :delete, path: path, key: :secret)
end
entitlements(entitlement_identifier) click to toggle source
# File lib/tarpon/request/subscriber.rb, line 20
def entitlements(entitlement_identifier)
  self.class::Entitlement.new(subscriber_path: path, entitlement_identifier: entitlement_identifier)
end
get_or_create() click to toggle source

rubocop:disable Naming/AccessorMethodName

# File lib/tarpon/request/subscriber.rb, line 11
def get_or_create
  perform(method: :get, path: path, key: :public)
end
offerings() click to toggle source
# File lib/tarpon/request/subscriber.rb, line 24
def offerings
  self.class::Offering.new(subscriber_path: path)
end
subscriptions(product_id) click to toggle source
# File lib/tarpon/request/subscriber.rb, line 28
def subscriptions(product_id)
  self.class::Subscription.new(subscriber_path: path, product_id: product_id)
end

Private Instance Methods

path() click to toggle source
# File lib/tarpon/request/subscriber.rb, line 34
def path
  "/subscribers/#{@app_user_id}"
end