Current section

Files

Jump to
polarex lib polarex schemas organization_create.ex
Raw

lib/polarex/schemas/organization_create.ex

defmodule Polarex.OrganizationCreate do
@moduledoc """
Provides struct and type for a OrganizationCreate
"""
@type t :: %__MODULE__{
avatar_url: String.t() | nil,
country: String.t() | nil,
customer_email_settings: Polarex.OrganizationCustomerEmailSettings.t() | nil,
customer_portal_settings: Polarex.OrganizationCustomerPortalSettings.t() | nil,
default_presentment_currency: String.t() | nil,
default_tax_behavior: String.t() | nil,
details: Polarex.OrganizationDetails.t() | nil,
email: String.t() | nil,
feature_settings: Polarex.OrganizationFeatureSettings.t() | nil,
legal_entity: map | nil,
name: String.t(),
notification_settings: Polarex.OrganizationNotificationSettings.t() | nil,
slug: String.t(),
socials: [Polarex.OrganizationSocialLink.t()] | nil,
subscription_settings: Polarex.OrganizationSubscriptionSettings.t() | nil,
website: String.t() | nil
}
defstruct [
:avatar_url,
:country,
:customer_email_settings,
:customer_portal_settings,
:default_presentment_currency,
:default_tax_behavior,
:details,
:email,
:feature_settings,
:legal_entity,
:name,
:notification_settings,
:slug,
:socials,
:subscription_settings,
:website
]
@doc false
@spec __fields__(atom) :: keyword
def __fields__(type \\ :t)
def __fields__(:t) do
[
avatar_url: {:union, [{:string, "uri"}, :null]},
country:
{:union,
[
{:enum,
[
"AD",
"AE",
"AF",
"AG",
"AI",
"AL",
"AM",
"AO",
"AQ",
"AR",
"AS",
"AT",
"AU",
"AW",
"AX",
"AZ",
"BA",
"BB",
"BD",
"BE",
"BF",
"BG",
"BH",
"BI",
"BJ",
"BL",
"BM",
"BN",
"BO",
"BQ",
"BR",
"BS",
"BT",
"BV",
"BW",
"BY",
"BZ",
"CA",
"CC",
"CD",
"CF",
"CG",
"CH",
"CI",
"CK",
"CL",
"CM",
"CN",
"CO",
"CR",
"CV",
"CW",
"CX",
"CY",
"CZ",
"DE",
"DJ",
"DK",
"DM",
"DO",
"DZ",
"EC",
"EE",
"EG",
"EH",
"ER",
"ES",
"ET",
"FI",
"FJ",
"FK",
"FM",
"FO",
"FR",
"GA",
"GB",
"GD",
"GE",
"GF",
"GG",
"GH",
"GI",
"GL",
"GM",
"GN",
"GP",
"GQ",
"GR",
"GS",
"GT",
"GU",
"GW",
"GY",
"HK",
"HM",
"HN",
"HR",
"HT",
"HU",
"ID",
"IE",
"IL",
"IM",
"IN",
"IO",
"IQ",
"IS",
"IT",
"JE",
"JM",
"JO",
"JP",
"KE",
"KG",
"KH",
"KI",
"KM",
"KN",
"KR",
"KW",
"KY",
"KZ",
"LA",
"LB",
"LC",
"LI",
"LK",
"LR",
"LS",
"LT",
"LU",
"LV",
"LY",
"MA",
"MC",
"MD",
"ME",
"MF",
"MG",
"MH",
"MK",
"ML",
"MM",
"MN",
"MO",
"MP",
"MQ",
"MR",
"MS",
"MT",
"MU",
"MV",
"MW",
"MX",
"MY",
"MZ",
"NA",
"NC",
"NE",
"NF",
"NG",
"NI",
"NL",
"NO",
"NP",
"NR",
"NU",
"NZ",
"OM",
"PA",
"PE",
"PF",
"PG",
"PH",
"PK",
"PL",
"PM",
"PN",
"PR",
"PS",
"PT",
"PW",
"PY",
"QA",
"RE",
"RO",
"RS",
"RW",
"SA",
"SB",
"SC",
"SD",
"SE",
"SG",
"SH",
"SI",
"SJ",
"SK",
"SL",
"SM",
"SN",
"SO",
"SR",
"SS",
"ST",
"SV",
"SX",
"SZ",
"TC",
"TD",
"TF",
"TG",
"TH",
"TJ",
"TK",
"TL",
"TM",
"TN",
"TO",
"TR",
"TT",
"TV",
"TW",
"TZ",
"UA",
"UG",
"UM",
"US",
"UY",
"UZ",
"VA",
"VC",
"VE",
"VG",
"VI",
"VN",
"VU",
"WF",
"WS",
"YE",
"YT",
"ZA",
"ZM",
"ZW"
]},
:null
]},
customer_email_settings: {:union, [{Polarex.OrganizationCustomerEmailSettings, :t}, :null]},
customer_portal_settings:
{:union, [{Polarex.OrganizationCustomerPortalSettings, :t}, :null]},
default_presentment_currency:
{:enum,
[
"aed",
"all",
"amd",
"aoa",
"ars",
"aud",
"awg",
"azn",
"bam",
"bbd",
"bdt",
"bif",
"bmd",
"bnd",
"bob",
"brl",
"bsd",
"bwp",
"bzd",
"cad",
"cdf",
"chf",
"clp",
"cny",
"cop",
"crc",
"cve",
"czk",
"djf",
"dkk",
"dop",
"dzd",
"egp",
"etb",
"eur",
"fjd",
"fkp",
"gbp",
"gel",
"gip",
"gmd",
"gnf",
"gtq",
"gyd",
"hkd",
"hnl",
"htg",
"huf",
"idr",
"ils",
"inr",
"isk",
"jmd",
"jpy",
"kes",
"kgs",
"khr",
"kmf",
"krw",
"kyd",
"kzt",
"lak",
"lkr",
"lrd",
"lsl",
"mad",
"mdl",
"mga",
"mkd",
"mnt",
"mop",
"mur",
"mvr",
"mwk",
"mxn",
"myr",
"mzn",
"nad",
"ngn",
"nio",
"nok",
"npr",
"nzd",
"pab",
"pen",
"pgk",
"php",
"pkr",
"pln",
"pyg",
"qar",
"ron",
"rsd",
"rwf",
"sar",
"sbd",
"scr",
"sek",
"sgd",
"shp",
"sos",
"srd",
"szl",
"thb",
"tjs",
"top",
"try",
"ttd",
"twd",
"tzs",
"uah",
"ugx",
"usd",
"uyu",
"uzs",
"vnd",
"vuv",
"wst",
"xaf",
"xcd",
"xcg",
"xof",
"xpf",
"yer",
"zar",
"zmw"
]},
default_tax_behavior: {:enum, ["location", "inclusive", "exclusive"]},
details: {:union, [{Polarex.OrganizationDetails, :t}, :null]},
email: {:union, [{:string, "email"}, :null]},
feature_settings: {:union, [{Polarex.OrganizationFeatureSettings, :t}, :null]},
legal_entity: {:union, [:map, :null]},
name: :string,
notification_settings: {:union, [{Polarex.OrganizationNotificationSettings, :t}, :null]},
slug: :string,
socials: {:union, [[{Polarex.OrganizationSocialLink, :t}], :null]},
subscription_settings: {:union, [{Polarex.OrganizationSubscriptionSettings, :t}, :null]},
website: {:union, [{:string, "uri"}, :null]}
]
end
end