Current section
Files
Jump to
Current section
Files
lib/thinkific/model/promotion_request.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.PromotionRequest do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"name",
:"description",
:"starts_at",
:"expires_at",
:"discount_type",
:"amount",
:"product_ids",
:"coupon_ids",
:"duration"
]
@type t :: %__MODULE__{
:"name" => String.t,
:"description" => String.t,
:"starts_at" => DateTime.t,
:"expires_at" => DateTime.t,
:"discount_type" => DiscountType,
:"amount" => float(),
:"product_ids" => [float()],
:"coupon_ids" => [float()],
:"duration" => float()
}
end
defimpl Poison.Decoder, for: Thinkific.Model.PromotionRequest do
import Thinkific.Deserializer
def decode(value, options) do
value
|> deserialize(:"discount_type", :struct, Thinkific.Model.DiscountType, options)
end
end