Class: Trycourier::Resources::Tenants::Preferences::Items
- Inherits:
-
Object
- Object
- Trycourier::Resources::Tenants::Preferences::Items
- Defined in:
- lib/trycourier/resources/tenants/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::Preferences::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.
75 76 77 |
# File 'lib/trycourier/resources/tenants/preferences/items.rb', line 75 def initialize(client:) @client = client end |
Instance Method Details
#delete(topic_id, tenant_id: , request_options: {}) ⇒ nil
Remove Default Preferences For Topic
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/trycourier/resources/tenants/preferences/items.rb', line 58 def delete(topic_id, params) parsed, = Trycourier::Tenants::Preferences::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::Preferences::ItemUpdateParams for more details.
Create or Replace Default Preferences For Topic
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/trycourier/resources/tenants/preferences/items.rb', line 30 def update(topic_id, params) parsed, = Trycourier::Tenants::Preferences::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 |