Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entities #58

Open
wants to merge 291 commits into
base: v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
291 commits
Select commit Hold shift + click to select a range
975df06
Add event entity support R=cdworak,usaha,bharvey (#69)
Jan 29, 2019
278d7ca
Updated entity code to accomodate varying Google Attributes fields (#77)
Jan 29, 2019
d928a6b
CustomFieldService -> LocationCustomFieldService; double pointer support
cdworak Feb 8, 2019
eecffe1
**Date to **string
cdworak Feb 8, 2019
d97d1ab
Add LocationType variables
xzou Feb 8, 2019
02e0161
added cf endpoint location entitytype
byronharvey24 Feb 13, 2019
026f0fb
hours: Strip leading 0's
cdworak Feb 13, 2019
3d51ed9
add external first party reviews create endpoint
byronharvey24 Feb 13, 2019
8f29470
Merge branch 'createReviewsEndpoint' into entities
byronharvey24 Feb 13, 2019
a58dc3f
Add lastLoginDate to Users struct PC-43487 (#84)
alexisgrow Feb 20, 2019
976bb56
update reviews service to handle response
byronharvey24 Feb 20, 2019
9f7df51
Merge branch 'reviewsUpdates' into entities
byronharvey24 Feb 20, 2019
5916716
Add GetCountryCode() to LocationEntity
xzou Feb 22, 2019
2da3d76
customfield_service helpers, add restuarant entity
cdworak Feb 22, 2019
27a272a
Update variables for healthcare professional and healthcare facility
xzou Feb 22, 2019
41976c6
Return Hours reference from SetClosedAllWeek (#89)
bhainesva Feb 23, 2019
350d8e8
add healthcare_professional entity
cdworak Feb 25, 2019
497c648
unorderedstrings: if both nil, not diff
cdworak Feb 25, 2019
b84ec9e
entity_diff: prevent diff from returning too early
cdworak Feb 25, 2019
318c71c
Add LocationType Event
cdworak Feb 26, 2019
d45e0aa
Update searchID param to searchIDs (#96)
bhainesva Feb 27, 2019
9360a79
Create review diff, update pointers, and add getter to entities
byronharvey24 Feb 25, 2019
281c05b
CustomFieldService: stop adding duplicates for multioption select ids
alexisgrow Feb 28, 2019
2a4c54c
modify healthcare professional entity
cdworak Mar 4, 2019
23cf225
Update hours helper struct serialize to return NullRegularHours()
xzou Mar 6, 2019
55f27ca
export helper functions (#103)
cdworak Mar 8, 2019
23f3b9c
add entity ACL function to users_service (#100)
alexisgrow Mar 12, 2019
dd356f0
Replace LanguageProfile with Entity (#104)
bhainesva Mar 13, 2019
526070b
Add delete operation to entity service (#105)
byronharvey24 Mar 13, 2019
601c633
Add methods to DayHours; null check *Hours in GetDayHours
xzou Feb 27, 2019
abd2797
language profile upsert: add id param
cdworak Mar 15, 2019
3f00a53
add support for LanguageProfile:ListAll (#107)
bhainesva Mar 18, 2019
e9714ae
yext-go changes for MBE ETL Implementation (#108)
Mar 19, 2019
02b446f
Update generic diff function name (#109)
Mar 19, 2019
fd8d030
Add methods to get the names of set multi-option and single-option va…
xzou Mar 19, 2019
5623455
Set field on generic entity (#111)
cdworak Mar 21, 2019
68b5b34
entity_unmarshal: handle null day hours (and other null values in obj…
cdworak Mar 27, 2019
13881f0
entity_service: Add filters functionality
xzou Mar 28, 2019
1d8549c
entity_unmarshal: Check if type is struct before calling NumField()
xzou Mar 28, 2019
4dd13fa
entity: update json tag of specialties to specialities to match Yext …
cdworak Mar 28, 2019
6094a59
Lat long (#116)
tbirdsall Apr 2, 2019
15195c9
Degrees Fix (#117)
pshah28 Apr 11, 2019
d9b8b68
customfield_service: handle null option value (#118)
cdworak Apr 11, 2019
2956ec3
Change type of logos from **Image to **Photo
xzou Apr 12, 2019
133538f
Add support for fields param (#119)
bhainesva Apr 15, 2019
77ed347
entity_diff: handle double pointer to nil (aka null)
cdworak Apr 18, 2019
5b1c20a
Add Get NPI for Healthcare Professional Entity
creotutar Apr 25, 2019
7e96640
unordered strings equal: Update null checking for interface (#122)
alexisgrow Apr 29, 2019
569a37b
Hours: allow for Closed or closed (#124)
cdworak Apr 29, 2019
547bf13
Add geomodifier to location entity (#127)
pshah28 Apr 30, 2019
c72be6b
SetLabelsWithUnorderedStrings: handle nil J=PC-43989
cdworak May 13, 2019
e9a8a52
Register healthcare professional entity and add Get functions
cdworak May 30, 2019
23afbb1
get and set custom field values by field name
cdworak Jun 5, 2019
864fce5
updating gender to **string
cdworak Jun 10, 2019
af2d590
Comment labels
byronharvey24 Jul 1, 2019
27e6419
Add and register ATM entity
xzou Jul 9, 2019
7243539
Merge branch 'entities' of github.com:yext/yext-go into commentLabels
byronharvey24 Jul 17, 2019
9c8a2c5
Remove references to upper-snake-case entity types
xzou Jul 15, 2019
628e0ad
Merge branch 'entities' of github.com:yext/yext-go into commentLabels
byronharvey24 Jul 17, 2019
266822e
add healthcare facility entity (#136)
pshah28 Jul 17, 2019
6517472
Merge branch 'commentLabels' into entities
byronharvey24 Jul 17, 2019
4b51b45
Added custom field type tests to entity differ (#140)
the-nemz Aug 2, 2019
aa98311
Add getters for VideoUrl (#141)
the-nemz Aug 7, 2019
24f0309
Diff() for RawEntity
cdworak Aug 27, 2019
59974c0
Add constant for Yext hours format
xzou Aug 28, 2019
9df5ae7
Add and register Hotel entity (#138)
xzou Sep 9, 2019
1c07385
J=PC-59368 Add image width, height and thumbnails fields for images (…
bjulian5 Sep 11, 2019
2e8b9a1
Adding breakfast field values (#149)
Zavoky Sep 24, 2019
42749aa
add google fields to hotel entity (#145)
pshah28 Sep 26, 2019
b3dbf63
add GetMultiOptionIds for error handling (#151)
pshah28 Sep 26, 2019
bec3ff3
Add wifi profile field values (#152)
Zavoky Sep 27, 2019
5ba2b25
Added Insurances Accepted field to healthcare facility (#153)
jesuyedavid Oct 2, 2019
6780be3
return diff on nil fields (#154)
pshah28 Oct 8, 2019
d1d6359
reorder attributes of location entity
cdworak Oct 8, 2019
41ac027
Add performers field to event entity (#148)
AidanFitzgerald Oct 9, 2019
ff88d9e
hours: unspecified all week (#157)
jesuyedavid Oct 15, 2019
96b9590
Adding more hotel profile fields (#156)
Zavoky Oct 21, 2019
d9806fe
Changing to single pointer strings (#158)
Zavoky Oct 22, 2019
9c6067c
added reviewLanguage and transactionId to reviews struct
AidanFitzgerald Oct 31, 2019
10afc2b
added more fields to reviews struct
AidanFitzgerald Oct 31, 2019
dde8202
Fixing bicycle values (#161)
Zavoky Nov 11, 2019
5d75f4d
Updates alongside account syncer implementation (#162)
Nov 12, 2019
5c9cd62
RawEntityClient (#163)
cdworak Nov 13, 2019
6584331
customfield create: preserve id (#164)
cdworak Nov 20, 2019
fa6f110
Adding linked location field to events (#165)
Zavoky Dec 3, 2019
bfa9961
add GetUnorderedStrings helper (#167)
pshah28 Dec 5, 2019
3939888
Add invitationId to Review struct (#169)
etseff Dec 10, 2019
7b08de6
Improve error messaging for ETLs J=PC-65697 (#170)
Dec 16, 2019
a529c70
Adding timezone field (#171)
Zavoky Dec 16, 2019
8caeee3
add ReservationUrl to Healthcare Professional entity (#173)
AidanFitzgerald Dec 17, 2019
34f0219
Create helper function for converting string slice to EntityType slic…
Dec 20, 2019
73a926b
raw entity: get and set helpers
cdworak Jan 7, 2020
3c0a763
Remove WheelchairAccessbile (same as MobilityAccessible)
cdworak Jan 8, 2020
c393182
hotel: add all inclusive options
cdworak Jan 8, 2020
320d33a
Delete entity ID before upsert (#178)
Zavoky Jan 14, 2020
745ccf3
language profile service: handle nil meta
cdworak Jan 16, 2020
825b6b4
update yext menu fields (#180)
jesuyedavid Jan 22, 2020
932decb
hours: rename to location_hours to signify that is legacy format (#181)
cdworak Jan 29, 2020
41ba405
changing calorie type to *int
Zavoky Jan 31, 2020
8dd92f7
add job entity (#182)
jesuyedavid Feb 10, 2020
c4a2913
Adding Facebook cover & profile fields (#183)
Zavoky Feb 19, 2020
f418b8a
Add Geomodifier to Restaurant Entity Definition (#184)
Feb 27, 2020
c2890ba
add facebookcta field and constants
AidanFitzgerald Mar 5, 2020
1f22402
-J=PC-63853 changes to entity_registry and unmarshal needed for hybri…
AidanFitzgerald Mar 9, 2020
52495f8
fix unnecessary double ifs
AidanFitzgerald Mar 20, 2020
e36a72d
Merge branch 'entities-hhm' into entities
AidanFitzgerald Mar 20, 2020
a4ebb0f
prevent hours parsing panic and return error (#190)
pshah28 Mar 23, 2020
a99fefe
analytics_service: Always return the response and error (#191)
Mar 23, 2020
54fa1ab
Add definition for FAQ entity type
Mar 26, 2020
f0ab5c5
add reopen date to hours (#192)
pshah28 Apr 10, 2020
4006991
Add format param
cdworak Apr 17, 2020
4e22daa
adding fields to analytics request (#194)
Zavoky May 6, 2020
7d01629
Analytics fields (#195)
Zavoky May 6, 2020
61b3abf
add education type constants for healthcareprofessionals
AidanFitzgerald May 6, 2020
92ac743
customfields: adding validation field (#197)
nsiskind Jun 8, 2020
68baaf1
customfield.go : update custom field validation min/max val to float6…
nsiskind Jun 12, 2020
6477c9c
feat(healthcare): add telehealth url field to providers and facilities
nirmalpatel94 Aug 5, 2020
364d21a
feat(hotel): add indoor and outdoor pool fields to hotel entities
nirmalpatel94 Aug 5, 2020
22f540b
feat(healthcare): add getter for display url for telehealth url field
nirmalpatel94 Aug 5, 2020
4aadec8
fix(healthcare): fix telehealth type definition
nirmalpatel94 Aug 5, 2020
f0b7598
entity location: add 'black owned business' and 'pickup and delivery …
stephh2 Aug 14, 2020
77b9fc6
feat(jobs): add Location profile field to job struct
nirmalpatel94 Aug 17, 2020
996299e
fix(jobs): fix api name for application url
nirmalpatel94 Aug 18, 2020
8cc4799
feat(entity): add service area places (#205)
wenright Sep 22, 2020
b0c69b5
feat(hotel): added pools to hotel entities (#206)
danielwuhoo Nov 5, 2020
eacd1b4
adding 'accepting new patients' and 'covid 19 info url' (#207)
Zavoky Dec 14, 2020
4b36f35
feat(entity): adds RemoveEntry for rawEntity (#208)
AidanFitzgerald Dec 21, 2020
00c254d
feat(entity-location): add SourceUrl as an exposed string for struct …
christianterence Feb 26, 2021
b0928c3
feat: add drive-through hours profile field
xzou Mar 8, 2021
1a0eed2
entity_location: add cta yext type (#212)
nsiskind Mar 19, 2021
3e22583
Update analytics review fields to match what was changed in this CR h…
Apr 2, 2021
c907e2d
feat(entity_service): add rich text format field
nirmalpatel94 Apr 6, 2021
428ec1d
Remove publisherSuggestionType, searchTerm, searchType, and foursquar…
Apr 21, 2021
5198a92
adds accessHours profile field to locations
AidanFitzgerald May 6, 2021
8ad7007
adds funcs for getting all option names for option select fields
AidanFitzgerald May 20, 2021
564248b
adds new func to determine if raw entity is zero value
AidanFitzgerald May 19, 2021
33c9444
add tests and support for []interface{}
AidanFitzgerald May 19, 2021
4f9ae0f
fixes bug in rawEntityIsZeroValue
AidanFitzgerald May 24, 2021
95af150
adds helpArticle entity type (#220)
nsiskind May 25, 2021
8ff78e5
location_customfield: add ToDate function for yext.Date (#221)
nsiskind Jun 2, 2021
403fbb7
helparticle: add landing page URL field (#222)
nsiskind Jun 16, 2021
74b5acc
Add Activity Logs and update some Analytics Report (#223)
zxu10 Jun 17, 2021
4cee729
adds DigitalGuestRoomKeys field to hotel entity struct (#224)
AidanFitzgerald Jun 22, 2021
3285b96
add activitylogservice to client.go (#225)
zxu10 Jun 24, 2021
9adcff2
update actordetails to activity log (#226)
zxu10 Jun 25, 2021
7739778
Add google place id (#227)
JamesJMH Jun 28, 2021
9a2ed94
update activity log and analytics data for att J=PC-134030 TEST=manua…
zxu10 Jul 6, 2021
79597c6
healthcare professional: implements setValidDegrees method
Jul 7, 2021
dba56c6
fix activity log email (#230)
zxu10 Jul 8, 2021
2d3fba5
Add googlePlaceId for healthcare professionals (#231)
JamesJMH Jul 12, 2021
ffaee4a
fix page views api name and add cumulative rating get function (#233)
zxu10 Jul 13, 2021
3be7855
add npi for healthcare facilities (#234)
JamesJMH Jul 15, 2021
6461473
feat: adds profile field "Impressum" to location entity struct (#235)
Aug 24, 2021
a2fb31e
add competitor field to analytics data (#236)
zxu10 Aug 26, 2021
031738f
feat(entity): add new entity type "Financial Professional"
aliang97 Aug 31, 2021
d47f26d
adds covid fields to hotel entity type
AidanFitzgerald Sep 16, 2021
a816811
Added delivery hours field to restaurant entity
John-Nguyen Oct 7, 2021
c649951
adds googleMyBusinessLabels to healthcare professional and facility (…
marclanepitt Oct 7, 2021
4588a60
feat(location_entity): adds timezone field to entity (#242)
Oct 18, 2021
f697650
add verbose response logging when we encounter a failure in our Do (#…
marclanepitt Oct 27, 2021
9beb496
entity_location: make GoogleWebsiteOverride a **string (#245)
nsiskind Oct 28, 2021
b877477
Googlewebsite fix (#247)
nsiskind Oct 29, 2021
30a0a61
add request body to err message for debugging request failures (#246)
marclanepitt Oct 29, 2021
8fc75ed
fix, update formatted string to use string (#248)
marclanepitt Oct 29, 2021
9bf6c56
additions to valid degrees & job field (#244)
Zavoky Oct 29, 2021
95cd994
print dump response error (#249)
marclanepitt Nov 1, 2021
ea92ee0
fix typo in hiringOrganization json
jpjamipark Nov 2, 2021
de8e69b
Add analytics clicks event and update page views event (#252)
stephh2 Nov 3, 2021
75e59d1
Add Entity ID metric to analytics data struct (#253)
stephh2 Nov 4, 2021
14300f9
client.go error logging (#251)
Zavoky Nov 9, 2021
877ad62
price: add price object (#255)
nsiskind Nov 12, 2021
5a7e005
retry network request on connection reset from server (#256)
marclanepitt Nov 16, 2021
70155e7
feat(reviews): add reviews update endpoint
jpjamipark Nov 30, 2021
3c2b347
Add label ids as review request param
stephh2 Dec 3, 2021
247a84f
feat: add service for admin apis (#254)
danielwuhoo Dec 7, 2021
f8b7e7c
nil platform bool != zero value (#259)
Zavoky Dec 8, 2021
2db3bf0
Revert "nil platform bool != zero value (#259)"
Zavoky Dec 14, 2021
f0cc464
feat: add services service for add requests (#260)
danielwuhoo Dec 16, 2021
ac7e78d
feat: add FAQ fields to locationEntity
jpjamipark Jan 11, 2022
577ac06
add 'strip unsupported formats' (#262)
Zavoky Jan 18, 2022
424d01c
review-service: add UpdateLabels, externalId (#263)
cdworak Jan 20, 2022
22522e0
review: removing duplicate external id (#264)
cdworak Jan 20, 2022
91bd932
review-service: add external id to update object (#265)
cdworak Jan 20, 2022
c03f9c1
add new answers values to analytics structs
jpjamipark Jan 20, 2022
2041c5e
add Entity struct to Reviewer struct (#267)
cblair28 Feb 10, 2022
29de764
add pre processing option ot menu list data (#268)
marclanepitt Mar 7, 2022
e2dbfc9
custom-field-service: add translations field to options (#269)
sri-jayakumar Mar 8, 2022
e9c26a7
update service existinglocationaddresponse type for agreementid (#271)
marclanepitt Mar 17, 2022
ce987ac
add rendered option for entity language profiles (#270)
mtusman Mar 17, 2022
482a7d9
adds GoogleMyBusinessLabels field to location entities (#272)
AidanFitzgerald Mar 25, 2022
82bffe9
adds pickupdelivery field
AidanFitzgerald Apr 9, 2022
692866c
added employmentType field to job entities
Zavoky Apr 12, 2022
e8b1aef
added pickuphours to location entity
Zavoky May 4, 2022
4f4205a
rnd: add progress bar to show entity loading from API progress (#273)
jesuyedavid May 19, 2022
ce8dd24
fix(entity_service): add nil check
nirmalpatel94 May 19, 2022
c1083c9
entity_service: add hide progress bar option (#275)
jesuyedavid Jun 22, 2022
6e9dd4f
Add Geomodifier to Healthcare Professional entity
hoosRed Jul 12, 2022
6b03300
making a user's createdDate field accessible (#277)
NathanielGE Jul 15, 2022
f640e47
add brunch hours and drive-through hours to restaurant entity (#279)
JohnCho92 Jul 15, 2022
db2df01
added option to consider nil booleans as non-zero values (#281)
Zavoky Aug 2, 2022
9acb0b1
updated logic for **bools found in pointers
Zavoky Aug 3, 2022
781b27d
Entities facebookusername (#282)
AidanFitzgerald Aug 7, 2022
40db20f
add Slug to Healthcare Professional entity (#283)
JohnCho92 Aug 25, 2022
6f5d988
add Slug to Healthcare Facility entity (#284)
JohnCho92 Aug 26, 2022
28266ec
PC-182867: add google entity relationship location entity field (#285)
Aug 30, 2022
c1716a4
Update Financial Professional Field types for DisclosureLink AndroidA…
nsiskind Sep 8, 2022
c2ef04b
add invitationId to ReviewCreateInvitationResponse struct (#287)
mtusman Sep 23, 2022
379d11f
change isclosed from **bool to bool to treat nil and false the same (…
cdworak Sep 26, 2022
35ffb59
Listings (#289)
nsiskind Oct 13, 2022
25a07c0
adds entity_product.go for product entity type (#291)
AidanFitzgerald Dec 13, 2022
c2a0816
modify AnalyticsData struct (#292)
mtusman Jan 13, 2023
71542db
Adding Google Place ID & Facebook Store ID
Zavoky Jan 17, 2023
8778db6
adds PrimaryPhoto field to products (#293)
AidanFitzgerald Jan 20, 2023
d0c7b05
add createreviewliveapi to review service (#294)
jesuyedavid Mar 2, 2023
8e8aa17
add support for listing impressions metric (#295)
mtusman Mar 9, 2023
f7f2a27
add rankTrackingCompetitors to location entity
matthewleifer Apr 13, 2023
cec6d5a
add timezone field for restaurant entities (#297)
AidanFitzgerald Apr 21, 2023
148e145
feat(custom): amend pr comments:wq
kyled526 Apr 27, 2023
c79eb98
add facebook location descriptor and username fields for restaurant e…
JohnCho92 May 17, 2023
34f39de
feat: add custom unmarshalling for newer V param's custom fields
nirmalpatel94 Jul 18, 2023
9bfb0c1
migrate custom field endpoint to optionally use the configuration end…
mtusman Sep 12, 2023
1d0529b
feat: add config option to use EU host domain for yextapis.com (#302)
kunal-p Nov 27, 2023
ae2f67f
fix: update AnalyticsFilters FolderId name and type
junpark1213 Dec 19, 2023
ffd40cc
fix: update click metric to new click count metric
junpark1213 Jan 5, 2024
39bb0ba
feat(hotel & restaurant): add additional fields to base struct (#304)
stephh2 Jan 5, 2024
257a54d
add product lists to financial professional entities (#306)
Jan 18, 2024
399f2ae
fix: remove deprecated metrics
junpark1213 Feb 14, 2024
51f8fc3
fix(restaurant): add DineInHours to base struct
dgurland Feb 20, 2024
8d50bfc
feat(reviews): add new review api fields
nirmalpatel94 Mar 7, 2024
f6d684a
feat(custom): add nonbinary gender to healthcare professional entity …
Jeffrey-Rhoads17 Mar 28, 2024
36f22ff
feat(custom): change supported format struct for richtextv2 field (#311)
2018lwang Mar 29, 2024
70869ee
feat: add notifyUser field to user
jknutsonn May 8, 2024
7c11c04
feat(entity_service): add convertRichTextToHTML param (#313)
dkang3021 May 9, 2024
919a4bf
feat(hotel+restaurant): add addl fields (#314)
peteros086 Jun 17, 2024
d47ec01
fix(custom): allow for multiple data types of IDs from Review Update …
Jeffrey-Rhoads17 Jun 17, 2024
2e0a927
Revert "feat(hotel+restaurant): add addl fields (#314)" (#316)
Jeffrey-Rhoads17 Jun 17, 2024
d453c8d
feat(hotel+restaurant): add addl fields (#317)
Jeffrey-Rhoads17 Jun 18, 2024
2c02c9d
Revert "feat(hotel+restaurant): add addl fields (#317)" (#318)
peteros086 Jun 21, 2024
d5e98d6
feat(assets): add folderids field
matthewleifer Jul 26, 2024
db1616c
feat(entities): add timestamp field to entity-meta
fsc8494 Aug 12, 2024
d818783
feat(entities): add getter function for timestamp field
fsc8494 Aug 12, 2024
c68fa76
feat(entities): add GetTimestampAsTime function
fsc8494 Aug 13, 2024
bcdcdca
Revert "feat(entities): add GetTimestampAsTime function"
fsc8494 Aug 15, 2024
3696c38
feat(license): add license service (#323)
stephh2 Sep 10, 2024
c64ffde
feat(license): fix passing opts to tokenListHelper (#324)
kaneleeyext Sep 30, 2024
75ab0d0
feat(healthcare-professional): Add YextDisplayCoordinate property and…
tritpham Oct 8, 2024
c880e4a
license-service: list license assignments in single object (#326)
stephh2 Oct 25, 2024
16a7daa
entity: add CreatedTimestamp field to entityMeta struct (#327)
ajgist Nov 5, 2024
19383a4
client: add optional Update-Operation-Id header to API requests (#328)
Jared-Hood Dec 9, 2024
5256e02
fix(custom): add option for list CF types and proper fallback for CFT…
Jeffrey-Rhoads17 Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type EntityMeta struct {
AccountId *string `json:"accountId,omitempty"`
EntityType EntityType `json:"entityType,omitempty"`
FolderId *string `json:"folderId,omitempty"`
LabelIds *UnorderedStrings `json:"labelIds,omitempty"`
Labels *UnorderedStrings `json:"labels,omitempty"`
CategoryIds *[]string `json:"categoryIds,omitempty"`
Language *string `json:"language,omitempty"`
CountryCode *string `json:"countryCode,omitempty"`
Expand Down
31 changes: 14 additions & 17 deletions location_entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ type LocationEntity struct {
BaseEntity

// Admin
FolderId *string `json:"folderId,omitempty"`
LabelIds *UnorderedStrings `json:"labelIds,omitempty"`
CategoryIds *[]string `json:"categoryIds,omitempty"`
Closed *bool `json:"closed,omitempty"`
Keywords *[]string `json:"keywords,omitempty"`
Language *string `json:"language,omitempty"`
CategoryIds *[]string `json:"categoryIds,omitempty"`
Closed *bool `json:"closed,omitempty"`
Keywords *[]string `json:"keywords,omitempty"`

// Address Fields
Name *string `json:"name,omitempty"`
Expand Down Expand Up @@ -447,8 +444,8 @@ func (y LocationEntity) GetKeywords() (v []string) {
}

func (y LocationEntity) GetLanguage() (v string) {
if y.Language != nil {
v = *y.Language
if y.BaseEntity.Meta.Language != nil {
v = *y.BaseEntity.Meta.Language
}
return v
}
Expand Down Expand Up @@ -496,8 +493,8 @@ func (y LocationEntity) GetLanguages() (v []string) {
}

func (y LocationEntity) GetFolderId() string {
if y.FolderId != nil {
return *y.FolderId
if y.BaseEntity.Meta.FolderId != nil {
return *y.BaseEntity.Meta.FolderId
}
return ""
}
Expand All @@ -509,20 +506,20 @@ func (y LocationEntity) GetCategoryIds() (v []string) {
return v
}

func (y LocationEntity) GetLabelIds() (v UnorderedStrings) {
if y.LabelIds != nil {
v = *y.LabelIds
func (y LocationEntity) GetLabels() (v UnorderedStrings) {
if y.BaseEntity.Meta.Labels != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably also move these functions under BaseEntity

v = *y.BaseEntity.Meta.Labels
}
return v
}

func (y LocationEntity) SetLabelIds(v []string) {
func (y LocationEntity) SetLabels(v []string) {
l := UnorderedStrings(v)
y.SetLabelIdsWithUnorderedStrings(l)
y.SetLabelsWithUnorderedStrings(l)
}

func (y LocationEntity) SetLabelIdsWithUnorderedStrings(v UnorderedStrings) {
y.LabelIds = &v
func (y LocationEntity) SetLabelsWithUnorderedStrings(v UnorderedStrings) {
y.BaseEntity.Meta.Labels = &v
}

func (y LocationEntity) GetPaymentOptions() (v []string) {
Expand Down