Class: Trycourier::Resources::Tenants::DefaultPreferences::Items
- Inherits:
-
Object
- Object
- Trycourier::Resources::Tenants::DefaultPreferences::Items
- Defined in:
- lib/trycourier/resources/tenants/default_preferences/items.rb
Instance Method Summary collapse
-
#delete(topic_id, tenant_id: , request_options: {}) ⇒ nil
Remove Default Preferences For Topic.
-
#initialize(client:) ⇒ Items
constructor
private
A new instance of Items.
-
#update(topic_id, tenant_id: , status: , custom_routing: nil, has_custom_routing: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Tenants::DefaultPreferences::ItemUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Items
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Items.
76 77 78 |
# File 'lib/trycourier/resources/tenants/default_preferences/items.rb', line 76 def initialize(client:) @client = client end |
Instance Method Details
#delete(topic_id, tenant_id: , request_options: {}) ⇒ nil
Remove Default Preferences For Topic
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/trycourier/resources/tenants/default_preferences/items.rb', line 59 def delete(topic_id, params) parsed, = Trycourier::Tenants::DefaultPreferences::ItemDeleteParams.dump_request(params) tenant_id = parsed.delete(:tenant_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["tenants/%1$s/default_preferences/items/%2$s", tenant_id, topic_id], model: NilClass, options: ) end |
#update(topic_id, tenant_id: , status: , custom_routing: nil, has_custom_routing: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Tenants::DefaultPreferences::ItemUpdateParams for more details.
Create or Replace Default Preferences For Topic
31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/trycourier/resources/tenants/default_preferences/items.rb', line 31 def update(topic_id, params) parsed, = Trycourier::Tenants::DefaultPreferences::ItemUpdateParams.dump_request(params) tenant_id = parsed.delete(:tenant_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :put, path: ["tenants/%1$s/default_preferences/items/%2$s", tenant_id, topic_id], body: parsed, model: NilClass, options: ) end |