Class: Sendly::EnterpriseSettingsSubResource

Inherits:
Object
  • Object
show all
Defined in:
lib/sendly/enterprise.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ EnterpriseSettingsSubResource

Returns a new instance of EnterpriseSettingsSubResource.



306
307
308
# File 'lib/sendly/enterprise.rb', line 306

def initialize(client)
  @client = client
end

Instance Method Details

#get_auto_top_upObject



310
311
312
# File 'lib/sendly/enterprise.rb', line 310

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



314
315
316
317
318
319
320
321
322
323
# File 'lib/sendly/enterprise.rb', line 314

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