Current section

Files

Jump to
ex_thinkific_api lib thinkific model user_response.ex
Raw

lib/thinkific/model/user_response.ex

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule Thinkific.Model.UserResponse do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"id",
:"created_at",
:"first_name",
:"last_name",
:"full_name",
:"company",
:"email",
:"roles",
:"avatar_url",
:"bio",
:"headline",
:"affiliate_code",
:"external_source",
:"affiliate_commission",
:"affiliate_commission_type",
:"affiliate_payout_email",
:"administered_course_ids",
:"custom_profile_fields"
]
@type t :: %__MODULE__{
:"id" => float(),
:"created_at" => DateTime.t,
:"first_name" => String.t,
:"last_name" => String.t,
:"full_name" => String.t,
:"company" => String.t,
:"email" => String.t,
:"roles" => [Role],
:"avatar_url" => String.t,
:"bio" => String.t,
:"headline" => String.t,
:"affiliate_code" => String.t,
:"external_source" => String.t,
:"affiliate_commission" => float(),
:"affiliate_commission_type" => String.t,
:"affiliate_payout_email" => String.t,
:"administered_course_ids" => [float()],
:"custom_profile_fields" => [CustomProfileField]
}
end
defimpl Poison.Decoder, for: Thinkific.Model.UserResponse do
import Thinkific.Deserializer
def decode(value, options) do
value
|> deserialize(:"roles", :list, Thinkific.Model.Role, options)
|> deserialize(:"custom_profile_fields", :list, Thinkific.Model.CustomProfileField, options)
end
end