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.



358
359
360
# File 'lib/sendly/enterprise.rb', line 358

def initialize(client)
  @client = client
end

Instance Method Details

#get_auto_top_upObject



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