# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. # typed: true # frozen_string_literal: true require 'sorbet-runtime' require 'faraday' module StackOne module Shared # AccountAddressSchemasValue - The ISO 3166-1 alpha-2 code of the country. class AccountAddressSchemasValue < T::Enum enums do AF = new('AF') AL = new('AL') DZ = new('DZ') AS = new('AS') AD = new('AD') AO = new('AO') AI = new('AI') AQ = new('AQ') AG = new('AG') AR = new('AR') AM = new('AM') AW = new('AW') AU = new('AU') AT = new('AT') AZ = new('AZ') BS = new('BS') BH = new('BH') BD = new('BD') BB = new('BB') BY = new('BY') BE = new('BE') BZ = new('BZ') BJ = new('BJ') BM = new('BM') BT = new('BT') BO = new('BO') BQ = new('BQ') BA = new('BA') BW = new('BW') BV = new('BV') BR = new('BR') IO = new('IO') BN = new('BN') BG = new('BG') BF = new('BF') BI = new('BI') KH = new('KH') CM = new('CM') CA = new('CA') CV = new('CV') KY = new('KY') CF = new('CF') TD = new('TD') CL = new('CL') CN = new('CN') CX = new('CX') CC = new('CC') CO = new('CO') KM = new('KM') CG = new('CG') CD = new('CD') CK = new('CK') CR = new('CR') HR = new('HR') CU = new('CU') CW = new('CW') CY = new('CY') CZ = new('CZ') CI = new('CI') DK = new('DK') DJ = new('DJ') DM = new('DM') DO = new('DO') EC = new('EC') EG = new('EG') SV = new('SV') GQ = new('GQ') ER = new('ER') EE = new('EE') ET = new('ET') FK = new('FK') FO = new('FO') FJ = new('FJ') FI = new('FI') FR = new('FR') GF = new('GF') PF = new('PF') TF = new('TF') GA = new('GA') GM = new('GM') GE = new('GE') DE = new('DE') GH = new('GH') GI = new('GI') GR = new('GR') GL = new('GL') GD = new('GD') GP = new('GP') GU = new('GU') GT = new('GT') GG = new('GG') GN = new('GN') GW = new('GW') GY = new('GY') HT = new('HT') HM = new('HM') VA = new('VA') HN = new('HN') HK = new('HK') HU = new('HU') IS = new('IS') IN = new('IN') ID = new('ID') IR = new('IR') IQ = new('IQ') IE = new('IE') IM = new('IM') IL = new('IL') IT = new('IT') JM = new('JM') JP = new('JP') JE = new('JE') JO = new('JO') KZ = new('KZ') KE = new('KE') KI = new('KI') KP = new('KP') KR = new('KR') KW = new('KW') KG = new('KG') LA = new('LA') LV = new('LV') LB = new('LB') LS = new('LS') LR = new('LR') LY = new('LY') LI = new('LI') LT = new('LT') LU = new('LU') MO = new('MO') MK = new('MK') MG = new('MG') MW = new('MW') MY = new('MY') MV = new('MV') ML = new('ML') MT = new('MT') MH = new('MH') MQ = new('MQ') MR = new('MR') MU = new('MU') YT = new('YT') MX = new('MX') FM = new('FM') MD = new('MD') MC = new('MC') MN = new('MN') ME = new('ME') MS = new('MS') MA = new('MA') MZ = new('MZ') MM = new('MM') NA = new('NA') NR = new('NR') NP = new('NP') NL = new('NL') NC = new('NC') NZ = new('NZ') NI = new('NI') NE = new('NE') NG = new('NG') NU = new('NU') NF = new('NF') MP = new('MP') NO = new('NO') OM = new('OM') PK = new('PK') PW = new('PW') PS = new('PS') PA = new('PA') PG = new('PG') PY = new('PY') PE = new('PE') PH = new('PH') PN = new('PN') PL = new('PL') PT = new('PT') PR = new('PR') QA = new('QA') RO = new('RO') RU = new('RU') RW = new('RW') RE = new('RE') BL = new('BL') SH = new('SH') KN = new('KN') LC = new('LC') MF = new('MF') PM = new('PM') VC = new('VC') WS = new('WS') SM = new('SM') ST = new('ST') SA = new('SA') SN = new('SN') RS = new('RS') SC = new('SC') SL = new('SL') SG = new('SG') SX = new('SX') SK = new('SK') SI = new('SI') SB = new('SB') SO = new('SO') ZA = new('ZA') GS = new('GS') SS = new('SS') ES = new('ES') LK = new('LK') SD = new('SD') SR = new('SR') SJ = new('SJ') SZ = new('SZ') SE = new('SE') CH = new('CH') SY = new('SY') TW = new('TW') TJ = new('TJ') TZ = new('TZ') TH = new('TH') TL = new('TL') TG = new('TG') TK = new('TK') TO = new('TO') TT = new('TT') TN = new('TN') TR = new('TR') TM = new('TM') TC = new('TC') TV = new('TV') UG = new('UG') UA = new('UA') AE = new('AE') GB = new('GB') US = new('US') UM = new('UM') UY = new('UY') UZ = new('UZ') VU = new('VU') VE = new('VE') VN = new('VN') VG = new('VG') VI = new('VI') WF = new('WF') EH = new('EH') YE = new('YE') ZM = new('ZM') ZW = new('ZW') end end # The country code class Country < ::StackOne::Utils::FieldAugmented extend T::Sig # The source value of the ISO 3166-1 alpha-2 code of the country. field :source_value, String, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } # The ISO 3166-1 alpha-2 code of the country. field :value, Shared::AccountAddressSchemasValue, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::AccountAddressSchemasValue, false) } } sig { params(source_value: String, value: Shared::AccountAddressSchemasValue).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end # AccountAddressValue - The type of the location. class AccountAddressValue < T::Enum enums do HOME = new('home') WORK = new('work') UNMAPPED_VALUE = new('unmapped_value') end end # The location type class LocationType < ::StackOne::Utils::FieldAugmented extend T::Sig # The source value of the location type. field :source_value, String, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('source_value') } } # The type of the location. field :value, Shared::AccountAddressValue, { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('value'), 'decoder': Utils.enum_from_string(Shared::AccountAddressValue, false) } } sig { params(source_value: String, value: Shared::AccountAddressValue).void } def initialize(source_value: nil, value: nil) @source_value = source_value @value = value end end class AccountAddress < ::StackOne::Utils::FieldAugmented extend T::Sig field :city, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('city') } } # The country code field :country, T.nilable(Shared::Country), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('country') } } # The location type field :location_type, T.nilable(Shared::LocationType), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('location_type') } } field :state, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('state') } } field :street_1, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('street_1') } } field :street_2, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('street_2') } } field :zip_code, T.nilable(String), { 'format_json': { 'letter_case': ::StackOne::Utils.field_name('zip_code') } } sig { params(city: T.nilable(String), country: T.nilable(Shared::Country), location_type: T.nilable(Shared::LocationType), state: T.nilable(String), street_1: T.nilable(String), street_2: T.nilable(String), zip_code: T.nilable(String)).void } def initialize(city: nil, country: nil, location_type: nil, state: nil, street_1: nil, street_2: nil, zip_code: nil) @city = city @country = country @location_type = location_type @state = state @street_1 = street_1 @street_2 = street_2 @zip_code = zip_code end end end end