Current section
Files
Jump to
Current section
Files
lib/thinkific/model/product_price_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.ProductPriceResponse do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:"id",
:"is_primary",
:"payment_type",
:"label",
:"price",
:"days_until_expiry",
:"pay_button_text",
:"number_of_payments",
:"interval",
:"interval_count",
:"trial_interval",
:"trial_interval_count",
:"custom_first_price",
:"price_name",
:"currency"
]
@type t :: %__MODULE__{
:"id" => float(),
:"is_primary" => boolean(),
:"payment_type" => PaymentType,
:"label" => String.t,
:"price" => String.t,
:"days_until_expiry" => String.t,
:"pay_button_text" => String.t,
:"number_of_payments" => String.t,
:"interval" => Interval,
:"interval_count" => String.t,
:"trial_interval" => TrialInterval,
:"trial_interval_count" => String.t,
:"custom_first_price" => String.t,
:"price_name" => String.t,
:"currency" => String.t
}
end
defimpl Poison.Decoder, for: Thinkific.Model.ProductPriceResponse do
import Thinkific.Deserializer
def decode(value, options) do
value
|> deserialize(:"payment_type", :struct, Thinkific.Model.PaymentType, options)
|> deserialize(:"interval", :struct, Thinkific.Model.Interval, options)
|> deserialize(:"trial_interval", :struct, Thinkific.Model.TrialInterval, options)
end
end