Class: Sendly::EnterpriseSettingsSubResource
- Inherits:
-
Object
- Object
- Sendly::EnterpriseSettingsSubResource
- Defined in:
- lib/sendly/enterprise.rb
Instance Method Summary collapse
- #get_auto_top_up ⇒ Object
-
#initialize(client) ⇒ EnterpriseSettingsSubResource
constructor
A new instance of EnterpriseSettingsSubResource.
- #update_auto_top_up(enabled:, threshold:, amount:, source_workspace_id: nil) ⇒ Object
Constructor Details
#initialize(client) ⇒ EnterpriseSettingsSubResource
Returns a new instance of EnterpriseSettingsSubResource.
358 359 360 |
# File 'lib/sendly/enterprise.rb', line 358 def initialize(client) @client = client end |
Instance Method Details
#get_auto_top_up ⇒ Object
362 363 364 |
# File 'lib/sendly/enterprise.rb', line 362 def get_auto_top_up @client.get("/enterprise/settings/auto-top-up") end |
#update_auto_top_up(enabled:, threshold:, amount:, source_workspace_id: nil) ⇒ Object
366 367 368 369 370 371 372 373 374 375 |
# File 'lib/sendly/enterprise.rb', line 366 def update_auto_top_up(enabled:, threshold:, amount:, source_workspace_id: nil) body = { enabled: enabled, threshold: threshold, amount: amount } body[:sourceWorkspaceId] = source_workspace_id if source_workspace_id @client.put("/enterprise/settings/auto-top-up", body) end |