Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from JordanSpencerWu/jwu/add-organization-and-l…
Browse files Browse the repository at this point in the history
…ocation-args

add organization and location uid args
  • Loading branch information
dnsbty authored Feb 13, 2020
2 parents 56644ef + c7cf615 commit 3303512
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The package can be installed by adding `podium_ex` to your list of dependencies
```elixir
def deps do
[
{:podium_ex, "~> 0.5"}
{:podium_ex, "~> 0.6"}
]
end
```
Expand Down
12 changes: 7 additions & 5 deletions lib/podium.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ defmodule Podium do
Update a [conversation item](https://hexdocs.pm/podium_ex/Podium.ConversationItem.html#content).
"""
@spec update_conversation_item(ConversationItem.t()) :: ConversationItem.t()
def update_conversation_item(%ConversationItem{uid: uid} = item) do
def update_conversation_item(%ConversationItem{} = item) do
conversation_item =
item
|> remove_nils()
Expand All @@ -51,15 +51,17 @@ defmodule Podium do
conversation_item: conversation_item
}

API.put("/conversation_items/#{uid}", Caramelize.camelize(conversation_item))
API.put("/conversation_items", Caramelize.camelize(conversation_item))
end

@doc """
Delete a [conversation item](https://hexdocs.pm/podium_ex/Podium.ConversationItem.html#content).
"""
@spec delete_conversation_item(String.t()) :: :ok
def delete_conversation_item(uid) do
API.delete("/conversation_items/#{uid}")
@spec delete_conversation_item(String.t(), String.t()) :: :ok
def delete_conversation_item(uid, organization_uid) do
application_uid = Application.get_env(:podium_ex, :application_uid)

API.delete("/applications/#{application_uid}/organizations/#{organization_uid}/conversation_items/#{uid}")
end

@doc """
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule PodiumEx.MixProject do
[
app: :podium_ex,
description: "HTTP client for interfacing with the Podium API",
version: "0.5.0",
version: "0.6.0",
elixir: "~> 1.7",
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down

0 comments on commit 3303512

Please sign in to comment.