Class: Tarpon::Request::Subscriber::Offering

Inherits:
Base
  • Object
show all
Defined in:
lib/tarpon/request/subscriber/offering.rb

Constant Summary

Constants inherited from Base

Base::DEFAULT_HEADERS

Instance Method Summary collapse

Constructor Details

#initialize(subscriber_path:, **opts) ⇒ Offering

Returns a new instance of Offering.



9
10
11
12
# File 'lib/tarpon/request/subscriber/offering.rb', line 9

def initialize(subscriber_path:, **opts)
  super(**opts)
  @subscriber_path = subscriber_path
end

Instance Method Details

#list(platform) ⇒ Object



14
15
16
17
18
19
# File 'lib/tarpon/request/subscriber/offering.rb', line 14

def list(platform)
  response = perform(method: :get, path: path.to_s, headers: { 'x-platform': platform.to_s }, key: :public)
  return response unless response.success?

  Tarpon::Entity::Offerings.new(**response.raw)
end