Class: Increase::Resources::EventSubscriptions
- Inherits:
-
Object
- Object
- Increase::Resources::EventSubscriptions
- Defined in:
- lib/increase/resources/event_subscriptions.rb
Instance Method Summary collapse
-
#create(url: , oauth_connection_id: nil, selected_event_category: nil, shared_secret: nil, status: nil, request_options: {}) ⇒ Increase::Models::EventSubscription
Some parameter documentations has been truncated, see Models::EventSubscriptionCreateParams for more details.
-
#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>
Some parameter documentations has been truncated, see Models::EventSubscriptionListParams for more details.
-
#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.
116 117 118 |
# File 'lib/increase/resources/event_subscriptions.rb', line 116 def initialize(client:) @client = client end |
Instance Method Details
#create(url: , oauth_connection_id: nil, selected_event_category: nil, shared_secret: nil, status: nil, request_options: {}) ⇒ Increase::Models::EventSubscription
Some parameter documentations has been truncated, see Models::EventSubscriptionCreateParams for more details.
Create an Event Subscription
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/increase/resources/event_subscriptions.rb', line 28 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>
Some parameter documentations has been truncated, see Models::EventSubscriptionListParams for more details.
List Event Subscriptions
101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/increase/resources/event_subscriptions.rb', line 101 def list(params = {}) parsed, = Increase::EventSubscriptionListParams.dump_request(params) @client.request( method: :get, path: "event_subscriptions", query: parsed, page: Increase::Internal::Page, model: Increase::EventSubscription, options: ) end |
#retrieve(event_subscription_id, request_options: {}) ⇒ Increase::Models::EventSubscription
Retrieve an Event Subscription
50 51 52 53 54 55 56 57 |
# File 'lib/increase/resources/event_subscriptions.rb', line 50 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
72 73 74 75 76 77 78 79 80 81 |
# File 'lib/increase/resources/event_subscriptions.rb', line 72 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 |