Class: Increase::Resources::EventSubscriptions

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/event_subscriptions.rb

Instance Method Summary collapse

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.

Parameters:



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

Parameters:

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
# File 'lib/increase/resources/event_subscriptions.rb', line 28

def create(params)
  parsed, options = Increase::EventSubscriptionCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "event_subscriptions",
    body: parsed,
    model: Increase::EventSubscription,
    options: 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

Parameters:

  • cursor (String)

    Return the page of entries after this one.

  • idempotency_key (String)

    Filter records to the one with the specified ‘idempotency_key` you chose for tha

  • limit (Integer)

    Limit the size of the list that is returned. The default (and maximum) is 100 ob

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



101
102
103
104
105
106
107
108
109
110
111
# File 'lib/increase/resources/event_subscriptions.rb', line 101

def list(params = {})
  parsed, options = Increase::EventSubscriptionListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "event_subscriptions",
    query: parsed,
    page: Increase::Internal::Page,
    model: Increase::EventSubscription,
    options: options
  )
end

#retrieve(event_subscription_id, request_options: {}) ⇒ Increase::Models::EventSubscription

Retrieve an Event Subscription

Parameters:

  • event_subscription_id (String)

    The identifier of the Event Subscription.

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



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

Parameters:

Returns:

See Also:



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, options = Increase::EventSubscriptionUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["event_subscriptions/%1$s", event_subscription_id],
    body: parsed,
    model: Increase::EventSubscription,
    options: options
  )
end