Class: Increase::Resources::EventSubscriptions
- Inherits:
-
Object
- Object
- Increase::Resources::EventSubscriptions
- Defined in:
- lib/increase/resources/event_subscriptions.rb,
sig/increase/resources/event_subscriptions.rbs
Instance Method Summary collapse
-
#create(url:, oauth_connection_id: nil, selected_event_categories: nil, shared_secret: nil, status: nil, request_options: {}) ⇒ Increase::Models::EventSubscription
Create an Event Subscription.
-
#initialize(client:) ⇒ EventSubscriptions
constructor
private
A new instance of EventSubscriptions.
-
#list(cursor: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::EventSubscription>
List Event Subscriptions.
-
#retrieve(event_subscription_id, request_options: {}) ⇒ Increase::Models::EventSubscription
Retrieve an Event Subscription.
-
#update(event_subscription_id, status: nil, request_options: {}) ⇒ Increase::Models::EventSubscription
Update an Event Subscription.
Constructor Details
#initialize(client:) ⇒ EventSubscriptions
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of EventSubscriptions.
126 127 128 |
# File 'lib/increase/resources/event_subscriptions.rb', line 126 def initialize(client:) @client = client end |
Instance Method Details
#create(url:, oauth_connection_id: nil, selected_event_categories: nil, shared_secret: nil, status: nil, request_options: {}) ⇒ Increase::Models::EventSubscription
Create an Event Subscription
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/increase/resources/event_subscriptions.rb', line 33 def create(params) parsed, = Increase::EventSubscriptionCreateParams.dump_request(params) @client.request( method: :post, path: "event_subscriptions", body: parsed, model: Increase::EventSubscription, options: ) end |
#list(cursor: nil, idempotency_key: nil, limit: nil, request_options: {}) ⇒ Increase::Internal::Page<Increase::Models::EventSubscription>
List Event Subscriptions
110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/increase/resources/event_subscriptions.rb', line 110 def list(params = {}) parsed, = Increase::EventSubscriptionListParams.dump_request(params) query = Increase::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "event_subscriptions", query: query, page: Increase::Internal::Page, model: Increase::EventSubscription, options: ) end |
#retrieve(event_subscription_id, request_options: {}) ⇒ Increase::Models::EventSubscription
Retrieve an Event Subscription
55 56 57 58 59 60 61 62 |
# File 'lib/increase/resources/event_subscriptions.rb', line 55 def retrieve(event_subscription_id, params = {}) @client.request( method: :get, path: ["event_subscriptions/%1$s", event_subscription_id], model: Increase::EventSubscription, options: params[:request_options] ) end |
#update(event_subscription_id, status: nil, request_options: {}) ⇒ Increase::Models::EventSubscription
Update an Event Subscription
78 79 80 81 82 83 84 85 86 87 |
# File 'lib/increase/resources/event_subscriptions.rb', line 78 def update(event_subscription_id, params = {}) parsed, = Increase::EventSubscriptionUpdateParams.dump_request(params) @client.request( method: :patch, path: ["event_subscriptions/%1$s", event_subscription_id], body: parsed, model: Increase::EventSubscription, options: ) end |