From 6377d27019f177b7826993a260f8c866d41b768b Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:19:03 +0000 Subject: [PATCH] Release v1.1.174 --- core/request_option.go | 2 +- lab_tests.go | 2 +- types.go | 71 ++++++++++++++++++++++++++++-------------- 3 files changed, 50 insertions(+), 25 deletions(-) diff --git a/core/request_option.go b/core/request_option.go index 92ef54c..1d7b83d 100644 --- a/core/request_option.go +++ b/core/request_option.go @@ -57,7 +57,7 @@ func (r *RequestOptions) cloneHeader() http.Header { headers := r.HTTPHeader.Clone() headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/tryVital/vital-go") - headers.Set("X-Fern-SDK-Version", "v1.1.173") + headers.Set("X-Fern-SDK-Version", "v1.1.174") return headers } diff --git a/lab_tests.go b/lab_tests.go index b482a8d..6d9d5fa 100644 --- a/lab_tests.go +++ b/lab_tests.go @@ -44,7 +44,7 @@ type CreateOrderRequestCompatible struct { AoeAnswers []*AoEAnswer `json:"aoe_answers,omitempty" url:"-"` Passthrough *string `json:"passthrough,omitempty" url:"-"` PatientDetails *PatientDetailsWithValidation `json:"patient_details,omitempty" url:"-"` - PatientAddress *PatientAddressCompatible `json:"patient_address,omitempty" url:"-"` + PatientAddress *PatientAddressWithValidation `json:"patient_address,omitempty" url:"-"` } type LabTestsGetAreaInfoRequest struct { diff --git a/types.go b/types.go index f9da38a..698da02 100644 --- a/types.go +++ b/types.go @@ -14065,6 +14065,54 @@ func (p *PatientAddressCompatible) String() string { return fmt.Sprintf("%#v", p) } +type PatientAddressWithValidation struct { + ReceiverName *string `json:"receiver_name,omitempty" url:"receiver_name,omitempty"` + FirstLine string `json:"first_line" url:"first_line"` + SecondLine *string `json:"second_line,omitempty" url:"second_line,omitempty"` + City string `json:"city" url:"city"` + State string `json:"state" url:"state"` + Zip string `json:"zip" url:"zip"` + Country string `json:"country" url:"country"` + PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` + + extraProperties map[string]interface{} + _rawJSON json.RawMessage +} + +func (p *PatientAddressWithValidation) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PatientAddressWithValidation) UnmarshalJSON(data []byte) error { + type unmarshaler PatientAddressWithValidation + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PatientAddressWithValidation(value) + + extraProperties, err := core.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + + p._rawJSON = json.RawMessage(data) + return nil +} + +func (p *PatientAddressWithValidation) String() string { + if len(p._rawJSON) > 0 { + if value, err := core.StringifyJSON(p._rawJSON); err == nil { + return value + } + } + if value, err := core.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + type PatientDetails struct { FirstName string `json:"first_name" url:"first_name"` LastName string `json:"last_name" url:"last_name"` @@ -15221,7 +15269,6 @@ func (q *Query) String() string { } type QueryConfig struct { - WeekStartsOn *QueryConfigWeekStartsOn `json:"week_starts_on,omitempty" url:"week_starts_on,omitempty"` ProviderPriorityOverrides []*QueryConfigProviderPriorityOverridesItem `json:"provider_priority_overrides,omitempty" url:"provider_priority_overrides,omitempty"` extraProperties map[string]interface{} @@ -15314,28 +15361,6 @@ func (q *QueryConfigProviderPriorityOverridesItem) Accept(visitor QueryConfigPro return fmt.Errorf("type %T does not include a non-empty union type", q) } -type QueryConfigWeekStartsOn string - -const ( - QueryConfigWeekStartsOnSunday QueryConfigWeekStartsOn = "sunday" - QueryConfigWeekStartsOnMonday QueryConfigWeekStartsOn = "monday" -) - -func NewQueryConfigWeekStartsOnFromString(s string) (QueryConfigWeekStartsOn, error) { - switch s { - case "sunday": - return QueryConfigWeekStartsOnSunday, nil - case "monday": - return QueryConfigWeekStartsOnMonday, nil - } - var t QueryConfigWeekStartsOn - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (q QueryConfigWeekStartsOn) Ptr() *QueryConfigWeekStartsOn { - return &q -} - type QueryGroupByItem struct { DateTruncExpr *DateTruncExpr DatePartExpr *DatePartExpr