Class: Increase::Resources::EventSubscriptions
- Inherits:
-
Object
- Object
- Increase::Resources::EventSubscriptions
- Defined in:
- lib/increase/resources/event_subscriptions.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Increase::Models::EventSubscription
Create an Event Subscription.
-
#initialize(client:) ⇒ EventSubscriptions
constructor
A new instance of EventSubscriptions.
-
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::EventSubscription>
List Event Subscriptions.
-
#retrieve(event_subscription_id, opts = {}) ⇒ Increase::Models::EventSubscription
Retrieve an Event Subscription.
-
#update(event_subscription_id, params = {}, opts = {}) ⇒ Increase::Models::EventSubscription
Update an Event Subscription.
Constructor Details
#initialize(client:) ⇒ EventSubscriptions
Returns a new instance of EventSubscriptions.
6 7 8 |
# File 'lib/increase/resources/event_subscriptions.rb', line 6 def initialize(client:) @client = client end |
Instance Method Details
#create(params = {}, opts = {}) ⇒ Increase::Models::EventSubscription
Create an Event Subscription
24 25 26 27 28 29 30 31 |
# File 'lib/increase/resources/event_subscriptions.rb', line 24 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/event_subscriptions" req[:body] = params req[:model] = Increase::Models::EventSubscription @client.request(req, opts) end |
#list(params = {}, opts = {}) ⇒ Increase::Page<Increase::Models::EventSubscription>
List Event Subscriptions
80 81 82 83 84 85 86 87 88 |
# File 'lib/increase/resources/event_subscriptions.rb', line 80 def list(params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/event_subscriptions" req[:query] = params req[:page] = Increase::Page req[:model] = Increase::Models::EventSubscription @client.request(req, opts) end |
#retrieve(event_subscription_id, opts = {}) ⇒ Increase::Models::EventSubscription
Retrieve an Event Subscription
39 40 41 42 43 44 45 |
# File 'lib/increase/resources/event_subscriptions.rb', line 39 def retrieve(event_subscription_id, opts = {}) req = {} req[:method] = :get req[:path] = "/event_subscriptions/#{event_subscription_id}" req[:model] = Increase::Models::EventSubscription @client.request(req, opts) end |
#update(event_subscription_id, params = {}, opts = {}) ⇒ Increase::Models::EventSubscription
Update an Event Subscription
57 58 59 60 61 62 63 64 |
# File 'lib/increase/resources/event_subscriptions.rb', line 57 def update(event_subscription_id, params = {}, opts = {}) req = {} req[:method] = :patch req[:path] = "/event_subscriptions/#{event_subscription_id}" req[:body] = params req[:model] = Increase::Models::EventSubscription @client.request(req, opts) end |