Skip to content

Commit

Permalink
Fix spec for ExForce.create_sobject/3 to include {:ok, id} tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenvisser101 authored and chulkilee committed Oct 5, 2018
1 parent c8e3086 commit bae3c80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ex_force.ex
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ defmodule ExForce do
See [SObject Rows](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_sobject_basic_info.htm)
"""
@spec create_sobject(client, sobject_name, map) :: :ok | {:error, any}
@spec create_sobject(client, sobject_name, map) :: {:ok, sobject_id} | {:error, any}
def create_sobject(client, name, attrs) do
case request(client, method: :post, url: "sobjects/#{name}/", body: attrs) do
{:ok, %Tesla.Env{status: 201, body: %{"id" => id, "success" => true}}} -> {:ok, id}
Expand Down

0 comments on commit bae3c80

Please sign in to comment.