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.
306 307 308 |
# File 'lib/sendly/enterprise.rb', line 306 def initialize(client) @client = client end |
Instance Method Details
#get_auto_top_up ⇒ Object
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 |