CampaignFlow.Client.Agencies (CampaignFlow Client v0.1.0)
View SourceAgency resource operations for the Campaign Flow API.
Summary
Functions
@spec create(CampaignFlow.Client.t(), map()) :: {CampaignFlow.Client.Request.response(), CampaignFlow.Client.t()}
Registers a new agency.
Examples
{:ok, agency} = CampaignFlow.Client.Agencies.create(client, %{
name: "ABC Real Estate",
abn: "12345678901"
})
@spec get(CampaignFlow.Client.t(), integer()) :: {CampaignFlow.Client.Request.response(), CampaignFlow.Client.t()}
Retrieves a specific agency by ID.
Examples
{:ok, agency} = CampaignFlow.Client.Agencies.get(client, 123)
@spec list( CampaignFlow.Client.t(), keyword() ) :: {CampaignFlow.Client.Request.response(), CampaignFlow.Client.t()}
Lists all agencies.
Options
:page- Page number for pagination:per_page- Number of items per page
Examples
{:ok, agencies} = CampaignFlow.Client.Agencies.list(client)
{:ok, agencies} = CampaignFlow.Client.Agencies.list(client, page: 2)