Current section

Files

Jump to
ex_thinkific_api lib thinkific model product_response.ex
Raw

lib/thinkific/model/product_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.ProductResponse do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"id",
:"created_at",
:"productable_id",
:"productable_type",
:"price",
:"position",
:"status",
:"name",
:"private",
:"hidden",
:"subscription",
:"days_until_expiry",
:"has_certificate",
:"keywords",
:"seo_title",
:"seo_description",
:"collection_ids",
:"related_product_ids",
:"description",
:"card_image_url",
:"slug",
:"product_prices"
]
@type t :: %__MODULE__{
:"id" => float(),
:"created_at" => DateTime.t,
:"productable_id" => float(),
:"productable_type" => String.t,
:"price" => float(),
:"position" => float(),
:"status" => String.t,
:"name" => String.t,
:"private" => boolean(),
:"hidden" => boolean(),
:"subscription" => boolean(),
:"days_until_expiry" => float(),
:"has_certificate" => boolean(),
:"keywords" => String.t,
:"seo_title" => String.t,
:"seo_description" => String.t,
:"collection_ids" => [float()],
:"related_product_ids" => [float()],
:"description" => String.t,
:"card_image_url" => String.t,
:"slug" => String.t,
:"product_prices" => [ProductPriceResponse]
}
end
defimpl Poison.Decoder, for: Thinkific.Model.ProductResponse do
import Thinkific.Deserializer
def decode(value, options) do
value
|> deserialize(:"product_prices", :list, Thinkific.Model.ProductPriceResponse, options)
end
end