Class: HighLevel::Resources::Funnels

Inherits:
Base
  • Object
show all
Defined in:
lib/high_level/resources/funnels.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from HighLevel::Resources::Base

Instance Method Details

#create_redirect(body:, **_opts) ⇒ Object

Create Redirect

The “Create Redirect” API Allows adding a new url redirect to the system. Use this endpoint to create a url redirect with the specified details. Ensure that the required information is provided in the request payload.



12
13
14
15
16
17
18
19
# File 'lib/high_level/resources/funnels.rb', line 12

def create_redirect(body:, **_opts)
  request(
    method: :post,
    path: "/funnels/lookup/redirect",
    security: ["Location-Access"],
    body: body
  )
end

#delete_redirect_by_id(id:, location_id: nil, **_opts) ⇒ Object

Delete Redirect By Id

The “Delete Redirect By Id” API Allows deletion of a URL redirect from the system using its unique identifier. Use this endpoint to delete a URL redirect with the specified ID using details provided in the request payload.



36
37
38
39
40
41
42
43
# File 'lib/high_level/resources/funnels.rb', line 36

def delete_redirect_by_id(id:, location_id: nil, **_opts)
  request(
    method: :delete,
    path: "/funnels/lookup/redirect/#{id}",
    security: ["Location-Access"],
    params: { "locationId" => location_id }.compact
  )
end

#fetch_redirects_list(location_id: nil, limit: nil, offset: nil, search: nil, **_opts) ⇒ Object

Fetch List of Redirects

Retrieves a list of all URL redirects based on the given query parameters.



48
49
50
51
52
53
54
55
# File 'lib/high_level/resources/funnels.rb', line 48

def fetch_redirects_list(location_id: nil, limit: nil, offset: nil, search: nil, **_opts)
  request(
    method: :get,
    path: "/funnels/lookup/redirect/list",
    security: ["Location-Access"],
    params: { "locationId" => location_id, "limit" => limit, "offset" => offset, "search" => search }.compact
  )
end

#get_funnels(location_id: nil, type: nil, category: nil, offset: nil, limit: nil, parent_id: nil, name: nil, **_opts) ⇒ Object

Fetch List of Funnels

Retrieves a list of all funnels based on the given query parameters.



60
61
62
63
64
65
66
67
# File 'lib/high_level/resources/funnels.rb', line 60

def get_funnels(location_id: nil, type: nil, category: nil, offset: nil, limit: nil, parent_id: nil, name: nil, **_opts)
  request(
    method: :get,
    path: "/funnels/funnel/list",
    security: ["Location-Access"],
    params: { "locationId" => location_id, "type" => type, "category" => category, "offset" => offset, "limit" => limit, "parentId" => parent_id, "name" => name }.compact
  )
end

#get_pages_by_funnel_id(location_id: nil, funnel_id: nil, name: nil, limit: nil, offset: nil, **_opts) ⇒ Object

Fetch list of funnel pages

Retrieves a list of all funnel pages based on the given query parameters.



72
73
74
75
76
77
78
79
# File 'lib/high_level/resources/funnels.rb', line 72

def get_pages_by_funnel_id(location_id: nil, funnel_id: nil, name: nil, limit: nil, offset: nil, **_opts)
  request(
    method: :get,
    path: "/funnels/page",
    security: ["Location-Access"],
    params: { "locationId" => location_id, "funnelId" => funnel_id, "name" => name, "limit" => limit, "offset" => offset }.compact
  )
end

#get_pages_count_by_funnel_id(location_id: nil, funnel_id: nil, name: nil, **_opts) ⇒ Object

Fetch count of funnel pages

Retrieves count of all funnel pages based on the given query parameters.



84
85
86
87
88
89
90
91
# File 'lib/high_level/resources/funnels.rb', line 84

def get_pages_count_by_funnel_id(location_id: nil, funnel_id: nil, name: nil, **_opts)
  request(
    method: :get,
    path: "/funnels/page/count",
    security: ["Location-Access"],
    params: { "locationId" => location_id, "funnelId" => funnel_id, "name" => name }.compact
  )
end

#update_redirect_by_id(id:, body:, **_opts) ⇒ Object

Update Redirect By Id

The “Update Redirect By Id” API Allows updating an existing URL redirect in the system. Use this endpoint to modify a URL redirect with the specified ID using details provided in the request payload.



24
25
26
27
28
29
30
31
# File 'lib/high_level/resources/funnels.rb', line 24

def update_redirect_by_id(id:, body:, **_opts)
  request(
    method: :patch,
    path: "/funnels/lookup/redirect/#{id}",
    security: ["Location-Access"],
    body: body
  )
end