# Generated by `mix github.gen` from docs/github-api/api.github.com.json. # Do not edit by hand; re-run the task instead. defmodule Noizu.Github.UserMarketplacePurchase do @moduledoc false defstruct [ :account, :billing_cycle, :free_trial_ends_on, :next_billing_date, :on_free_trial, :plan, :unit_count, :updated_at ] def from_json(json, headers \\ []) def from_json(nil, _headers), do: nil def from_json(list, headers) when is_list(list) do Enum.map(list, &from_json(&1, headers)) end def from_json(json, _headers) when is_map(json) do %__MODULE__{ account: Noizu.Github.MarketplaceAccount.from_json(Map.get(json, :account)), billing_cycle: Map.get(json, :billing_cycle), free_trial_ends_on: Map.get(json, :free_trial_ends_on), next_billing_date: Map.get(json, :next_billing_date), on_free_trial: Map.get(json, :on_free_trial), plan: Noizu.Github.MarketplaceListingPlan.from_json(Map.get(json, :plan)), unit_count: Map.get(json, :unit_count), updated_at: Map.get(json, :updated_at) } end def from_json(other, _headers), do: other end