Class: HighLevel::Resources::SaasApi
- Defined in:
- lib/high_level/resources/saas_api.rb
Instance Method Summary collapse
-
#bulk_disable_saas(company_id:, body:, authorization: nil, **_opts) ⇒ Object
Disable SaaS for locations.
-
#bulk_disable_saas_deprecated(company_id:, body:, **_opts) ⇒ Object
Disable SaaS for locations.
-
#bulk_enable_saas(company_id:, body:, authorization: nil, **_opts) ⇒ Object
Bulk Enable SaaS.
-
#bulk_enable_saas_deprecated(company_id:, body:, authorization: nil, **_opts) ⇒ Object
Bulk Enable SaaS.
-
#enable_saas_location(location_id:, body:, authorization: nil, **_opts) ⇒ Object
Enable SaaS for Sub-Account (Formerly Location).
-
#enable_saas_location_deprecated(location_id:, body:, **_opts) ⇒ Object
Enable SaaS for Sub-Account (Formerly Location).
-
#generate_payment_link(location_id:, body:, authorization: nil, **_opts) ⇒ Object
Update SaaS subscription.
-
#get_agency_plans(company_id:, authorization: nil, **_opts) ⇒ Object
Get Agency Plans.
-
#get_agency_plans_deprecated(company_id:, authorization: nil, **_opts) ⇒ Object
Get Agency Plans.
-
#get_location_subscription(location_id:, company_id: nil, authorization: nil, **_opts) ⇒ Object
Get Location Subscription Details.
-
#get_location_subscription_deprecated(location_id:, company_id: nil, authorization: nil, **_opts) ⇒ Object
Get Location Subscription Details.
-
#get_saas_locations(company_id:, page: nil, authorization: nil, **_opts) ⇒ Object
Get SaaS Locations.
-
#get_saas_locations_deprecated(company_id:, page: nil, authorization: nil, **_opts) ⇒ Object
Get SaaS Locations.
-
#get_saas_plan(plan_id:, company_id: nil, authorization: nil, **_opts) ⇒ Object
Get SaaS Plan.
-
#get_saas_plan_deprecated(plan_id:, company_id: nil, authorization: nil, **_opts) ⇒ Object
Get SaaS Plan.
-
#locations(customer_id: nil, subscription_id: nil, company_id: nil, authorization: nil, **_opts) ⇒ Object
Get locations by stripeId with companyId.
-
#locations_deprecated(customer_id: nil, subscription_id: nil, company_id: nil, **_opts) ⇒ Object
Get locations by stripeId with companyId.
-
#pause_location(location_id:, body:, authorization: nil, **_opts) ⇒ Object
Pause location.
-
#pause_location_deprecated(location_id:, body:, **_opts) ⇒ Object
Pause location.
-
#update_rebilling(company_id:, body:, authorization: nil, **_opts) ⇒ Object
Update Rebilling.
-
#update_rebilling_deprecated(company_id:, body:, **_opts) ⇒ Object
Update Rebilling.
-
#update_saas_subscription_deprecated(location_id:, body:, **_opts) ⇒ Object
Update SaaS subscription.
Methods inherited from Base
Constructor Details
This class inherits a constructor from HighLevel::Resources::Base
Instance Method Details
#bulk_disable_saas(company_id:, body:, authorization: nil, **_opts) ⇒ Object
Disable SaaS for locations
Disable SaaS for locations for given locationIds
197 198 199 200 201 202 203 204 205 |
# File 'lib/high_level/resources/saas_api.rb', line 197 def bulk_disable_saas(company_id:, body:, authorization: nil, **_opts) request( method: :post, path: "/saas/bulk-disable-saas/#{company_id}", security: ["Agency-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#bulk_disable_saas_deprecated(company_id:, body:, **_opts) ⇒ Object
Disable SaaS for locations
Disable SaaS for locations for given locationIds
36 37 38 39 40 41 42 43 |
# File 'lib/high_level/resources/saas_api.rb', line 36 def bulk_disable_saas_deprecated(company_id:, body:, **_opts) request( method: :post, path: "/saas-api/public-api/bulk-disable-saas/#{company_id}", security: ["Agency-Access"], body: body ) end |
#bulk_enable_saas(company_id:, body:, authorization: nil, **_opts) ⇒ Object
Bulk Enable SaaS
Enable SaaS mode for multiple locations with support for both SaaS v1 and v2
297 298 299 300 301 302 303 304 305 |
# File 'lib/high_level/resources/saas_api.rb', line 297 def bulk_enable_saas(company_id:, body:, authorization: nil, **_opts) request( method: :post, path: "/saas/bulk-enable-saas/#{company_id}", security: ["Agency-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#bulk_enable_saas_deprecated(company_id:, body:, authorization: nil, **_opts) ⇒ Object
Bulk Enable SaaS
Enable SaaS mode for multiple locations with support for both SaaS v1 and v2
132 133 134 135 136 137 138 139 140 |
# File 'lib/high_level/resources/saas_api.rb', line 132 def bulk_enable_saas_deprecated(company_id:, body:, authorization: nil, **_opts) request( method: :post, path: "/saas-api/public-api/bulk-enable-saas/#{company_id}", security: ["Agency-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#enable_saas_location(location_id:, body:, authorization: nil, **_opts) ⇒ Object
Enable SaaS for Sub-Account (Formerly Location)
<div>
<p>Enable SaaS for Sub-Account (Formerly Location) based on the data provided</p>
<div>
<span style= "display: inline-block;
width: 25px; height: 25px;
background-color: yellow;
color: black;
font-weight: bold;
font-size: 24px;
text-align: center;
line-height: 22px;
border: 2px solid black;
border-radius: 10%;
margin-right: 10px;">
!
</span>
<span>
<strong>
This feature is only available on Agency Pro ($497) plan.
</strong>
</span>
</div>
</div>
233 234 235 236 237 238 239 240 241 |
# File 'lib/high_level/resources/saas_api.rb', line 233 def enable_saas_location(location_id:, body:, authorization: nil, **_opts) request( method: :post, path: "/saas/enable-saas/#{location_id}", security: ["Agency-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#enable_saas_location_deprecated(location_id:, body:, **_opts) ⇒ Object
Enable SaaS for Sub-Account (Formerly Location)
<div>
<p>Enable SaaS for Sub-Account (Formerly Location) based on the data provided</p>
<div>
<span style= "display: inline-block;
width: 25px; height: 25px;
background-color: yellow;
color: black;
font-weight: bold;
font-size: 24px;
text-align: center;
line-height: 22px;
border: 2px solid black;
border-radius: 10%;
margin-right: 10px;">
!
</span>
<span>
<strong>
This feature is only available on Agency Pro ($497) plan.
</strong>
</span>
</div>
</div>
71 72 73 74 75 76 77 78 |
# File 'lib/high_level/resources/saas_api.rb', line 71 def enable_saas_location_deprecated(location_id:, body:, **_opts) request( method: :post, path: "/saas-api/public-api/enable-saas/#{location_id}", security: ["Agency-Access"], body: body ) end |
#generate_payment_link(location_id:, body:, authorization: nil, **_opts) ⇒ Object
Update SaaS subscription
Update SaaS subscription for given locationId and customerId
184 185 186 187 188 189 190 191 192 |
# File 'lib/high_level/resources/saas_api.rb', line 184 def generate_payment_link(location_id:, body:, authorization: nil, **_opts) request( method: :put, path: "/saas/update-saas-subscription/#{location_id}", security: ["Agency-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#get_agency_plans(company_id:, authorization: nil, **_opts) ⇒ Object
Get Agency Plans
Fetch all agency subscription plans for a given company ID
272 273 274 275 276 277 278 279 |
# File 'lib/high_level/resources/saas_api.rb', line 272 def get_agency_plans(company_id:, authorization: nil, **_opts) request( method: :get, path: "/saas/agency-plans/#{company_id}", security: ["Agency-Access"], headers: { "Authorization" => }.compact ) end |
#get_agency_plans_deprecated(company_id:, authorization: nil, **_opts) ⇒ Object
Get Agency Plans
Fetch all agency subscription plans for a given company ID
107 108 109 110 111 112 113 114 |
# File 'lib/high_level/resources/saas_api.rb', line 107 def get_agency_plans_deprecated(company_id:, authorization: nil, **_opts) request( method: :get, path: "/saas-api/public-api/agency-plans/#{company_id}", security: ["Agency-Access"], headers: { "Authorization" => }.compact ) end |
#get_location_subscription(location_id:, company_id: nil, authorization: nil, **_opts) ⇒ Object
Get Location Subscription Details
Fetch subscription details for a specific location from location metadata
284 285 286 287 288 289 290 291 292 |
# File 'lib/high_level/resources/saas_api.rb', line 284 def get_location_subscription(location_id:, company_id: nil, authorization: nil, **_opts) request( method: :get, path: "/saas/get-saas-subscription/#{location_id}", security: ["Agency-Access"], params: { "companyId" => company_id }.compact, headers: { "Authorization" => }.compact ) end |
#get_location_subscription_deprecated(location_id:, company_id: nil, authorization: nil, **_opts) ⇒ Object
Get Location Subscription Details
Fetch subscription details for a specific location from location metadata
119 120 121 122 123 124 125 126 127 |
# File 'lib/high_level/resources/saas_api.rb', line 119 def get_location_subscription_deprecated(location_id:, company_id: nil, authorization: nil, **_opts) request( method: :get, path: "/saas-api/public-api/get-saas-subscription/#{location_id}", security: ["Agency-Access"], params: { "companyId" => company_id }.compact, headers: { "Authorization" => }.compact ) end |
#get_saas_locations(company_id:, page: nil, authorization: nil, **_opts) ⇒ Object
Get SaaS Locations
Fetch all SaaS-activated locations for a company with pagination
310 311 312 313 314 315 316 317 318 |
# File 'lib/high_level/resources/saas_api.rb', line 310 def get_saas_locations(company_id:, page: nil, authorization: nil, **_opts) request( method: :get, path: "/saas/saas-locations/#{company_id}", security: ["Agency-Access"], params: { "page" => page }.compact, headers: { "Authorization" => }.compact ) end |
#get_saas_locations_deprecated(company_id:, page: nil, authorization: nil, **_opts) ⇒ Object
Get SaaS Locations
Fetch all SaaS-activated locations for a company with pagination
145 146 147 148 149 150 151 152 153 |
# File 'lib/high_level/resources/saas_api.rb', line 145 def get_saas_locations_deprecated(company_id:, page: nil, authorization: nil, **_opts) request( method: :get, path: "/saas-api/public-api/saas-locations/#{company_id}", security: ["Agency-Access"], params: { "page" => page }.compact, headers: { "Authorization" => }.compact ) end |
#get_saas_plan(plan_id:, company_id: nil, authorization: nil, **_opts) ⇒ Object
Get SaaS Plan
Fetch a specific SaaS plan by plan ID
323 324 325 326 327 328 329 330 331 |
# File 'lib/high_level/resources/saas_api.rb', line 323 def get_saas_plan(plan_id:, company_id: nil, authorization: nil, **_opts) request( method: :get, path: "/saas/saas-plan/#{plan_id}", security: ["Agency-Access"], params: { "companyId" => company_id }.compact, headers: { "Authorization" => }.compact ) end |
#get_saas_plan_deprecated(plan_id:, company_id: nil, authorization: nil, **_opts) ⇒ Object
Get SaaS Plan
Fetch a specific SaaS plan by plan ID
158 159 160 161 162 163 164 165 166 |
# File 'lib/high_level/resources/saas_api.rb', line 158 def get_saas_plan_deprecated(plan_id:, company_id: nil, authorization: nil, **_opts) request( method: :get, path: "/saas-api/public-api/saas-plan/#{plan_id}", security: ["Agency-Access"], params: { "companyId" => company_id }.compact, headers: { "Authorization" => }.compact ) end |
#locations(customer_id: nil, subscription_id: nil, company_id: nil, authorization: nil, **_opts) ⇒ Object
Get locations by stripeId with companyId
Get locations by stripeCustomerId or stripeSubscriptionId with companyId
171 172 173 174 175 176 177 178 179 |
# File 'lib/high_level/resources/saas_api.rb', line 171 def locations(customer_id: nil, subscription_id: nil, company_id: nil, authorization: nil, **_opts) request( method: :get, path: "/saas/locations", security: ["Agency-Access"], params: { "customerId" => customer_id, "subscriptionId" => subscription_id, "companyId" => company_id }.compact, headers: { "Authorization" => }.compact ) end |
#locations_deprecated(customer_id: nil, subscription_id: nil, company_id: nil, **_opts) ⇒ Object
Get locations by stripeId with companyId
Get locations by stripeCustomerId or stripeSubscriptionId with companyId
12 13 14 15 16 17 18 19 |
# File 'lib/high_level/resources/saas_api.rb', line 12 def locations_deprecated(customer_id: nil, subscription_id: nil, company_id: nil, **_opts) request( method: :get, path: "/saas-api/public-api/locations", security: ["Agency-Access"], params: { "customerId" => customer_id, "subscriptionId" => subscription_id, "companyId" => company_id }.compact ) end |
#pause_location(location_id:, body:, authorization: nil, **_opts) ⇒ Object
Pause location
Pause Sub account for given locationId
246 247 248 249 250 251 252 253 254 |
# File 'lib/high_level/resources/saas_api.rb', line 246 def pause_location(location_id:, body:, authorization: nil, **_opts) request( method: :post, path: "/saas/pause/#{location_id}", security: ["Agency-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#pause_location_deprecated(location_id:, body:, **_opts) ⇒ Object
Pause location
Pause Sub account for given locationId
83 84 85 86 87 88 89 90 |
# File 'lib/high_level/resources/saas_api.rb', line 83 def pause_location_deprecated(location_id:, body:, **_opts) request( method: :post, path: "/saas-api/public-api/pause/#{location_id}", security: ["Agency-Access"], body: body ) end |
#update_rebilling(company_id:, body:, authorization: nil, **_opts) ⇒ Object
Update Rebilling
Bulk update rebilling for given locationIds
259 260 261 262 263 264 265 266 267 |
# File 'lib/high_level/resources/saas_api.rb', line 259 def update_rebilling(company_id:, body:, authorization: nil, **_opts) request( method: :post, path: "/saas/update-rebilling/#{company_id}", security: ["Agency-Access"], headers: { "Authorization" => }.compact, body: body ) end |
#update_rebilling_deprecated(company_id:, body:, **_opts) ⇒ Object
Update Rebilling
Bulk update rebilling for given locationIds
95 96 97 98 99 100 101 102 |
# File 'lib/high_level/resources/saas_api.rb', line 95 def update_rebilling_deprecated(company_id:, body:, **_opts) request( method: :post, path: "/saas-api/public-api/update-rebilling/#{company_id}", security: ["Agency-Access"], body: body ) end |
#update_saas_subscription_deprecated(location_id:, body:, **_opts) ⇒ Object
Update SaaS subscription
Update SaaS subscription for given locationId and customerId
24 25 26 27 28 29 30 31 |
# File 'lib/high_level/resources/saas_api.rb', line 24 def update_saas_subscription_deprecated(location_id:, body:, **_opts) request( method: :put, path: "/saas-api/public-api/update-saas-subscription/#{location_id}", security: ["Agency-Access"], body: body ) end |