Class: Convoy::Subscription
- Inherits:
-
ApiResource
- Object
- ApiResource
- Convoy::Subscription
- Extended by:
- ApiOperations::Create
- Defined in:
- lib/convoy/resources/subscription.rb
Instance Attribute Summary
Attributes inherited from ApiResource
Instance Method Summary collapse
-
#initialize(id = nil, config = Convoy.config, **kwargs) ⇒ Subscription
constructor
A new instance of Subscription.
- #resource_uri ⇒ Object
Methods included from ApiOperations::Create
Methods included from ApiOperations::List
Methods included from ApiOperations::Delete
Methods included from ApiOperations::Save
Methods inherited from ApiResource
Methods included from ApiOperations::Request
Constructor Details
#initialize(id = nil, config = Convoy.config, **kwargs) ⇒ Subscription
Returns a new instance of Subscription.
8 9 10 11 12 13 |
# File 'lib/convoy/resources/subscription.rb', line 8 def initialize(id = nil, config = Convoy.config, **kwargs) @id = id @config = config super(**kwargs) end |
Instance Method Details
#resource_uri ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/convoy/resources/subscription.rb', line 15 def resource_uri if @id.nil? return "#{project_base_uri}/subscriptions" end "#{project_base_uri}/subscriptions/#{@id}" end |